Hi there
I just wondering from Hibernate document chapter16 about parent/child example as I quote
below:
#
If an object that was removed from a collection is an instance of a value type (eg, a composite element), that object will cease to be persistent and its state will be completely removed from the database. Likewise, adding a value type instance to the collection will cause its state to be immediately persistent.
#
On the other hand, if an entity is removed from a collection (a one-to-many or many-to-many association), it will not be deleted, by default. This behaviour is completely consistent - a change to the internal state of another entity should not cause the associated entity to vanish! Likewise, adding an entity to a collection does not cause that entity to become persistent, by default.
so, my question is, what actually the different between object and entity?
Thanks
_________________ <name>arin</name>
<at>netplus software</at>
|