Rejected
Details
Assignee
UnassignedUnassignedReporter
venkata sankaravenkata sankaraComponents
Affects versions
Priority
Critical
Details
Details
Assignee
Unassigned
UnassignedReporter
venkata sankara
venkata sankaraComponents
Affects versions
Priority
Created August 16, 2007 at 8:54 AM
Updated August 16, 2007 at 9:00 AM
Resolved August 16, 2007 at 9:00 AM
I have a classes i) Parent and ii) Child.
Both have only one field: String id;
Parent has been configured for one-to-many relationship with Child.
Entry in HBM:
<set name="children" lazy="true" inverse="true" cascade="all-delete-orphan" >
<key column="parent" />
<one-to-many class="model.Child" />
</set>
The following HQL doesn't cascade deletes:
delete Parent p where p.id = arentId
However, the following code cascades deletes:
Parent p = session.get(Parent, "1");
session.delete(parent);
I have attached my eclipse project also. It is a small one with hardly 5 files.