Hi to all,
I would like someone to elaborate me on the first approach for composite-id:
Quote:
Unfortunately, this approach to composite identifiers means that a persistent object is its own identifier. There is no convenient "handle" other than the object itself. You must instantiate an instance of the persistent class itself and populate its identifier properties before you can load() the persistent state associated with a composite key. We call this approach an embedded composite identifier, and discourage it for serious applications.
You can find this on the 1.5.6. composite-id chapter (Hibernate 3.2.)
here.
I don't understand what is the difference with the third approach (where we specify a component composite object). In both cases there will be a object instantiation for identifying, right?! What does Hibernate in the third approach opposite to the first one?! Why is it so inappropriate?
Kind Regards,
despot