Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7648437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:42:56+00:00 2026-05-31T10:42:56+00:00

I’ve been trying to migrate from NHibernate 2.3 to 3.2 , including moving from

  • 0

I’ve been trying to migrate from NHibernate 2.3 to 3.2, including moving from Fluent NHibernate 1.0 to 1.3.

After doing the upgrade, the Fluent conventions picked up by searching the assemblies don’t appear to be applied; I get numerous errors complaining about not being able to find certain properties or columns.

Edit:

My mapping setup looks like this:

.Mappings(
    m => m.FluentMappings
        .AddFromAssemblyOf<NHibernateMapping>()
        .Conventions.AddFromAssemblyOf<NHibernateMapping>())

I’ve managed to get the fluent interface to load all the conventions with a breakpoint on their constructors to track when they’re initialized. However, none of the conventions are actually being called: none of the breakpoints in their Apply methods are being hit.

The error manifests through NHibernate is as follows:

NHibernate.MappingException: Could not find a setter for property ‘All’ in class ‘Headline’

The property All does not have a setter – one of the conventions should change the mapping to refer to the setter on a different property.

On examination of the HBM files being exported, I can see that none of the conventions have been applied and the default Fluent conventions are being used.

Why are my conventions not being applied to the mapping?

Edit:

Through trial-and-error, I’ve found that the problem lies in the AddFromAssemblyOf<T>() call. The mapping system is finding and initializing each of the IConvention types, but then does not add them to the visitor and does not apply them to the mapping.

A workaround discovered is to add each convention manually with the Add<TConvention>() call. This works for us because we have a handful of conventions. It wouldn’t take much effort to write an extension method to replace AddFromAssemblyOf<T>(), if somebody required a more robust work-around to the problem.

Still unsure why this doesn’t work, but it feels like a bug now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:42:58+00:00Added an answer on May 31, 2026 at 10:42 am

    We are using 1.3 and use an extension method to add all of our conventions like so:

     var config = Fluently.Configure()
                    .Database(sqlConfig)
                    .Mappings(GetMappings)
                    .Diagnostics(x => x.Enable(Settings.EnableLogging))
                    .Search(ConfigureSearch)
                    .ExposeConfiguration(ExposeConfiguration);
    
    protected void GetMappings(MappingConfiguration mappingConfiguration)
            {
                foreach (var assemblyName in AssemblyHelper.GetModelAssemblies())
                {
                    var assembly = Assembly.Load(assemblyName);
    
    
         var assembly = Assembly.Load(assemblyName);
    
                        mappingConfiguration
                            .FluentMappings
                            .AddCustomConventions()
                            .AddFromAssembly(assembly);
    }
    }
    
    public static AutoPersistenceModel AddCustomConventions(this AutoPersistenceModel autoPersistenceModel)
             {
                 return
                         autoPersistenceModel
                         .Conventions.Add(typeof (StringLengthTypeConverter))
                         .Conventions.Add(typeof (GeneratedConvention))
                         .Conventions.Add(typeof (IndexPropertyConvention))
                         .Conventions.Add(typeof (LazyLoadPropertyConvention))
                         .Conventions.Add(typeof (LazyLoadClassConvention))
                         .Conventions.Add(typeof (FetchTypePropertyConvention))
                         .Conventions.Add(typeof (LazyLoadCollectionConvention))
                         .Conventions.Add(typeof (JsonStorageConvention))
                         .Conventions.Add(typeof (ManyToManyConvention))
                         .Conventions.Add(typeof (CustomForeignKeyConvention))
                         .Conventions.Add(typeof (CustomManyToManyTableNameConvention))
                         .Conventions.Add(typeof (HasManyConvention))
                         .Conventions.Add(typeof (IdConvention))
                         .Conventions.Add(typeof (PropertyConvention))
                         .Conventions.Add(typeof (ReferenceConvention))
                         .Conventions.Add(typeof (TableConvention))
                         .Conventions.Add(typeof (JoinedSubclassConvention));
             }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.