This content has been marked as final. Show 1 reply
- Bags (declared in Java as Collection) do not cause Hibernate to load the collection before a new element is added. If you don't care about the order of the elements, you can use them.
- if you require the order but you don't need the entire list when you add an element, you can write a method (say, addEvent(Event e)) that issues an HQL query to write the event. You don't appear to need to have the events loaded at this time (otherwise you wouldn't have wanted to avoid that).