I have just upgraded a project from FNH/NH version 1.2.0.694/3.0.0.4000 to 
1.4.0.0/3.3.1.4000, and tests that were working fine with the old version 
now break.
The error is:
SetUp : NHibernate.NonUniqueObjectException : a different object with the 
same identifier value was already associated with the session: 0, of 
entity: 

My mappings are setup by convention:

public void Apply(FluentNHibernate.Conventions.Instances.IIdentityInstance 
instance)
        {
            instance.Column(instance.EntityType.Name + "Id");
            instance.GeneratedBy.Identity();
        }


The tests are failing when it saves a couple of domain objects on the second 
save, so I guess that it is not generating an identity column as per the 
convention. Debugging shows the id being changed to 0 on save of the first item.


Has there been a change between the 2 versions that would explain this, and any 
ideas on what I should do to fix?

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fluent-nhibernate+unsubscr...@googlegroups.com.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
Visit this group at http://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/d/optout.

Reply via email to