使用hibernate 的问题

03-08-07 newpaul
在hibernate中 如何处理 父类和子类之间的关系的

cascade这个标签是怎么使用的

newpaul
2003-08-07 12:01
hibernate 文档中有这么一段话不是太理解 能解释一下吗

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.

yehs220
2003-08-07 12:17
说的是实体类型(entiry type)和值类型(value type)的差别。

看看文档吧。

猜你喜欢