persistence@glassfish.java.net

Re: Cascading relationships in ejb 3.0

From: James Sutherland <jamesssss_at_yahoo.com>
Date: Wed, 27 Feb 2008 06:08:35 -0800 (PST)

What operation cascading are you referring to? (merge, persist, remove)

In general if you do not always want to cascade, then do not set the cascade
on the relationship. Instead just perform the cascading operation in your
application. i.e. call merge/persist/remove on the desired related
entities.

You may also be able to perform some sort of selective cascading through
events.



ddevore wrote:
>
> I have a situation where there are cascading relationships that I need to
> make entity beans for. The problem is that if we are looking at any one
> element we will only want that one elements child at any one time. Is
> there a way I can turn off cascading beyond a certain level? --- Dru
> Devore
>
>


-----
---
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://en.wikibooks.org/wiki/Java_Persistence Java Persistence , 
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 
-- 
View this message in context: http://www.nabble.com/Cascading-relationships-in-ejb-3.0-tp15695945p15713956.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.