VIRGIN FOREST OF JAVA
不要埋头苦干,要学习,学习,再学习。。。。。
powered by R.Zeus
some person say:

When using a many-to-many association cascade="all", cascade="delete", and cascade="all-delete-orphans" aren't meaningful. That's because you might delete an instance that can have other parents pointing to it.

If you want to delete rows from the association table (rel_houses_owners) then I would suggest using two one-to-many relationships instead of many-to-many.

You would need one-to-many from owners to house_owners and many-to-one from house_owners to owners. This will allow you to cascade deletes in owner to house_owners without deleting the owner.

Use of many-to-many often leads to the solution described above and is hence discouraged.
posted on 2006-08-29 14:02 R.Zeus 阅读(285) 评论(0)  编辑  收藏 所属分类: Hibernate

只有注册用户登录后才能发表评论。


网站导航: