Hi,
I have a parent/child relationship.
My child table has several million records.
I've just migrated from EJB entity beans to hibernate, and everything works fine, except that I can't add a child to a parent withou causing hibernate to read all child entities into the collection.
I do something like this
variable = getVariable( ... );
sample = new Sample( ... );
variable.getSamples().add( sample );
this takes a lot of time, because hibernate fills the collection with all the samples.
any ideias on how to improve mapping/code to get rid of this and generate just one insert statement ?
I've read chapter 8 of the docs, and serached through the forum...
thanks
|