Through the Diagnostics() method on FluentConfiguration I've figured out that 
for whatever reason, "ScannedSources" contains the same assembly twice and 
"FluentMappings" contains the class mappings from that assembly twice as well. 
So since "FluentMappings" contains duplicates, I guess those duplicates are fed 
to NHibernate which then throws.

Whether this is new behavior on FNH or NHibernate's part, I don't know, but 
this is code that worked in NHibernate 2.8 and FNH 1.1 that doesn't work 
anymore because NHibernate throws DuplicateMappingException. Any ideas how I 
can figure out why my mapping assembly is scanned twice and why mappings are 
duplicated? Wouldn't it be smart of FNH to do a .Distinct() before adding 
mappings to NHibernate?  

--  
Asbjørn Ulsberg  -=|=- [email protected] (mailto:[email protected])
«He's a loathsome offensive brute, yet I can't look away»

On torsdag 1. september 2011 at 15:57, Asbjørn Ulsberg wrote:

> After upgrading to NHibernate 3.2 and a build of FNH 1.3 (against NHibernate 
> 3.2), I'm getting NHibernate.DuplicateMappingException for an entity. I've 
> written out all mappings in the AutoPersistenceModel to file, but I can't 
> find a duplicate. I've seen people experiencing this where `table="Entity"` 
> is repeated too many places, but can't find this in my mappings.  
>  
> How do I best debug this problem? Is there something internally in FNH I can 
> poke at to get at the information before NHibernate throws? I find it 
> incredibly annoying that NHibernate can't just tell me what the duplicate is, 
> but that is just the nature of NHibernate exceptions, I guess.  
>  
> --  
> Asbjørn Ulsberg  -=|=- [email protected] (mailto:[email protected])
> «He's a loathsome offensive brute, yet I can't look away»

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to