|
I've searched/googled everywhere and I can't seem to find this answer.
I have an entity, that contains a list of objects (100's). I want to persist this entity to the database but these 100 objects are not going to have unique ids compared to the id's of the objects in another entity, just unique in it's own parent entity.
I don't want to use a sequence to auto-generate the ids because that will be 100's of "next_val" calls that will slow the persistence down. Combine that with 1,000's of entity that will be persisting at least once a day and your talking 100's of 1,000's of "next_val" calls!
Isn't there a way to have the primary key of these objects be the primary key of the parent entity combined with, say, an id of the object (that is unique in the entity)? So, for example, lets say you have Entity Foo, with ID "abc" which contains a list of Bar. One of these Bar, has an ID of "def". Then, you could simply have the primary key of Bar "abc.def".
This seems like something many people would want to do...why does it seem so difficult to do so?
|