Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

@OneToMany - delete does not work

561600Feb 13 2007 — edited Oct 27 2008
hi,

I'm using Spring version 2.0.1 and Toplink essentials, and am encountering the following problem: in a OneToMany relationship, items that are deleted from the list are deleted from the cache but not from the database.

example tables:
TABLE_PARENT, PK=PARENT_ID
TABLE_CHILDREN, PK=CHILD_ID, FK TO TABLE_PARENT.PARENT_ID

example mappings:

@Entity
@Table(name="TABLE_PARENT")
public class Parent
{ ...
@OneToMany(cascade=CascadeType.ALL, mappedBy="m_parent",fetch = FetchType.EAGER)
private List<Child> m_childList = new ArrayList<Child>();
}

@Entity
@Table(name="TABLE_CHILD")
public class Child
{ ...
@ManyToOne(optional = false)
@JoinColumn(name="PARENT_ID")
private Parent m_parent;
}

Thanks,
yasmin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2008
Added on Feb 13 2007
8 comments
7,984 views