My guess is that NH wont ever know if that object was changed, so it will always consider the root dirty.
On Tue, Mar 17, 2009 at 6:56 AM, klawry <[email protected]> wrote: > > Here's the problem I'm running into. I'm using MS SQL 2005 and Castle > ActiveRecord RC3 with NHibernate 2.0.0.1001. I added a varbinary(max) > column to my database so that I can store a Serializable object. I > added a property to my ActiveRecord entity as follows: > > [Property(ColumnType = "Serializable")] > public PortletConfiguration StateObject > { > get { return stateObject; } > set { stateObject = value; } > > } > > My PortletConfiguration type (mentioned above) is Serializable. > ActiveRecord is correctly storing and retrieving the data perfectly. > There does not appear to be any problem with serializing or > deserializing the entity to/from the database. > > The problem is, any time I select data from my table, I notice that > ActiveRecord/NHibernate runs UPDATE commands when the session ends > (auto-flush at > end of session). This UPDATE command is run in SQL even though I have > not made any changes to my entity (i.e. no data has been changed). It > appears that ActiveRecord/NHibernate is incorrectly flagging the > entity as modified > and is trying to persist the "changes." > > I have isolated the problem to this single column. By removing this > column from my entity, the mysterious UPDATE commands no longer > occur. Do you have any suggestions? I'm really stuck. Any help > would be greatly appreciated. Thank you so much! > > > > -- Cheers, hammett http://hammett.castleproject.org/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
