I would like to know whether the following is possible.
I have a collection of objects that I am persisting via NHibernate. The list contains "archive" or "history" records for a given object. We might create a new "archive" record, and add it to this list, at any time during the life of the object. However, by default, the first time I add a new "archive" to the collection after loading the object, it will trigger a lazy-load of every "archive" currently persisted for that object. I really don't want to have to load all archives from the database, and into memory, just to create an archive record.
Ideally, I would be able to create an archive record, add it to the collection (without populating the collection with the database-stored entries), and persist it without ever loading the existing archives.
Is there some mechanism that makes this possible?
Thanks,
-Dan
|