Hi,
In my project I create an Investment object. I want to keep this object in memory but not to save it to the DB unless the user clicks a 'Save' button.
For some reason, NHibernate decides that the object is dirty and persists it to the DB even before the user clicked the 'Save' button.
I think the reason for this is that right after I create it, I add the Investment object to an Investments bag of a Portfolio object (a kind of "parent" of Investment). I think that when I do that, NHibernate dirties the Investment object.
How can I avoid this? Does this have to do with the cascade value set on the Investments bag in the Portfolio object? Which value is right for me there?
Thanks!
urig
_________________ urig
|