From: Ricardo P. (JIRA) <nh...@gm...> - 2011-05-25 20:21:54
|
[ http://216.121.112.228/browse/NH-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21197#action_21197 ] Ricardo Peres commented on NH-2727: ----------------------------------- For the record, here is what happens: when an entity is lazily loaded from a one-to-many association, its lock mode is set to Read, not None (in memory, at least). If lazy loading is disabled, its lock mode is None, and it no longer fires the event, which, I suppose, is the expected behavior. > Calling ISession.IsDirty Raises SaveOrUpdate Event > -------------------------------------------------- > > Key: NH-2727 > URL: http://216.121.112.228/browse/NH-2727 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0, 3.2.0Beta1 > Reporter: Ricardo Peres > Attachments: FlushTest.zip > > > When calling ISession.IsDirty() after loading an entity which lazy loads another one and doing nothing to them, the SaveOrUpdate event is raised on the lazy loaded entity. > This doesn't happen all the time, only if the lazy loaded entity is not specifically loaded beforehand. > The included test creates the DB and populates it with test records. The HIBERNATE_UNIQUE_KEY table must be created first, since SchemaUpdate does not create it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |