|
Hello, here's my case:
According to my domain model:
A School has many Students. and the relation is unidirectional
However when I use Set, adding a new student to a school causes entire students to be loaded.
If there are 1 million students, that's a big problem. In this sense , Sets are useless to me.
Using a bag is also useless. It is pretty troublesome if inverse = false and you add an item to your bag since it would truncate your table
Using and idbag is not possible. I've never seen a one-to-many mapping with idbag ?
So what to do ?
|