[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Cascade REMOVE
|
Are there any other relationships in these two objects? It could be some
sort of cyclic dependency.
If not, then please log the bug, and include as much information as
possible. (stack, SQL, remove code)
Ellen Kraffmiller wrote:
>
>
> I'm running into another problem with EclipseLink in Glassfish - when I
> delete an Entity that has a collection defined with a OneToMany
> relationship, cascade REMOVE doesn't seem to be working. The delete
> throws a foreign key violation error because the dependent entity is not
> deleted. Here is a code snippet:
>
> @Entity
> public class Study implements java.io.Serializable {
> ...
> @OneToMany(mappedBy="study", cascade={CascadeType.REMOVE,
> CascadeType.MERGE, CascadeType.PERSIST})
> private java.util.List<StudyAuthor> studyAuthors;
> ...
> }
>
> @Entity
> public class StudyAuthor implements java.io.Serializable {
> ...
> @ManyToOne
> private Study study;
> ...
> }
>
> This same code is working when I use TopLink Essentials. Before
> entering a bug I just wanted to check if there is some configuration
> issue that may be causing this.
> Thanks,
> Ellen
>
-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/Problem-with-container-based-transactions-tp15744929p15804698.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.