What it says on the tin; I want to modify a collection in Hibernate without forcing the collection to load, since it is a large volume of data (~100,000 records, monotonically increasing).
Right now, I add an element to this list by calling getEvents ().add (newEvent)
which, of course, causes events
to be populated.
Here's the mapping:
<bag name = "events" inverse = "true" cascade = "all-delete-orphan"
order-by = "event_date desc" lazy = "true">
<key>
<column name = "document_id" length = "64" not-null = "true" />
</key>
<one-to-many class = "EventValue" />
</bag>
How should I be doing this?