Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Nhibernate 2.1.0.1001
Mapping documents:
<property name="hairColorCollectie" type="HiDating.BusinessLayer.Mapping.EnumMappingHelper`1[[HiDating.BusinessLayer.HairColor, HiDating.BusinessLayer]], HiDating.BusinessLayer" access="field" column="PersonProfile_HairColorID" />
Code between sessionFactory.openSession() and session.close():
[Test]
public void CanClearProvincesInSearchProfile()
{
ISessionFactory _sessionFactory = new Configuration().Configure().BuildSessionFactory();
_iSession = _sessionFactory.OpenSession();
SearchProfile profile = (SearchProfile)_iSession.Get(typeof(SearchProfile), 47);
Assert.IsFalse(_iSession.IsDirty());
}
For my Current project I have to work with a legacy database.
In this database, collections have been mapped to single columns in the database. To map this to collections in .net, I have made use of IUserType and ICompositeUserType.
The issue now is that the Session.IsDirty() returns true when I retrieve the containing object.
I can't figure out what is causing the session to become dirty, I am making sure for instance, that I use the type of the enum in the mapping instead of an int32. Can somebody help me please!!!