The issue of sleep mode, where the behavior is ambiguous and / or dangerous. I have a one-to-many relationship that has a cascade-delete-orphan condition. And where is the condition for restricting items in the collection. Display here -
<hibernate-mapping>
<class name="User" table="user" >
<set table="email" inverse="true" cascade="all,delete-orphan" where="deleted!=true">
<key column="user_id">
<one-to-many class="Email"/>
</set>
</class>
</hibernate-mapping>
Now suppose I have a User object that is associated with one or more email objects, at least one of which is true for the remote property. Which of the following two happens when I call session.delete () in a User object?
- The user and all email objects, including deleted = true, are deleted.
- User and email objects deleted! = Null are deleted.
, 1) where, . 2), , child (email), . ? , Hibernate ?