Hello,
I'm using NHibernate 1.2Beta2.
I have a class User and a class UserGroup (lazy loading is active everywhere) and the classes are linked with a manytomany assoc.:
Code:
class User
{
public virtual void AddUserGroup(UserGroup ug)
{
// ug.bMyField -> is true (can see in debuggerview)
// inside the AddUser-Method the field is false (default(bool))
ug.AddUser(u);
// ug.bMyField -> is true
}
}
class UserGroup
{
private bool bMyField;
public virtual void AddUser(User u)
{
// this.bMyField -> is false
}
}
As you can see in the comments in this code-snippet (in the real code I have the add-logic and checking for contains etc... [don't needed here for understanding my problem]) the value of the field bMyField is "lost".
When I turn lazyloading off for the manytomany-assoc. all is fine. WHY? I need lazy loading...
Hope understanding me (sorry for my bad english).
Greetings,
Ramon