persistence@glassfish.java.net

Re: TopLink Essentials broken cascading delete

From: James Sutherland <jamesssss_at_yahoo.com>
Date: Thu, 29 May 2008 06:26:46 -0700 (PDT)

If your other relationships cause a cycle between the classes then this would
explain your error.

You might want to test if the same error occurs on EclipseLink, as the error
may be specific to TopLink Essentials.

For logging bugs you the TopLink Essentials Glassfish bug database is at:

https://glassfish.dev.java.net/servlets/ProjectIssues

EclipseLink's bug database is at:

https://bugs.eclipse.org/bugs/

You can also contact Oracle technical support.



Axl Mattheus-2 wrote:
>
> There is one @OneToOne with another class but the underlying SQL for the
> appropriate delete is always correct. Initially I thought that the
> ConcurrentSkipListSet may be the culprit. Its documentation states that an
> Iterator over it may not report all elements. However, I do not get the
> problem with other persistence providers. I also get the same behavior
> with
> a vanilla HashSet or a TreeSet when using TopLink Essentials. I does
> bother
> me a bit though...
>
> I have not tried the code in a CMP environment yet.
>
> ax/
>
> 2008/5/28 James Sutherland <jamesssss_at_yahoo.com>:
>
>>
>> Thank you for the very detailed description.
>>
>> This issue seems odd. There are known issues with constraint violation
>> and
>> deletion, but your model seems like it would be ok. Are there other
>> relationships than just these?
>>
>> The general cascading delete issue that TopLink has, can normally be
>> fixed
>> by removing the cascade delete and instead marking the mapping as
>> private-owned in the TopLink ClassDescriptor OneToManyMapping using a
>> DescriptorCustomizer. Otherwise you can remove or defer the database
>> constraint. Sometimes removing the objects one by one and using flush
>> can
>> also work.
>>
>> I forget the bug number for the known issue, but feel free to log your
>> issues in the bug database, or if you find the other issue you can add
>> your
>> scenario and vote for the issue.
>>
>>
>>
>> Axl Mattheus-2 wrote:
>> >
>> > To Whom it may Concern:
>> >
>> > PROBLEM:
>> > * Cascading deletes are broken under specific conditions when using
>> > TopLink Essentials as a persistence provider.
>


-----
---
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/TopLink-Essentials-broken-cascading-delete-tp17511114p17535833.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.