wood burning stoves 2.0*
The moose likes JPA Certification (OCEJPA) and the fly likes Why only cascade-persist can be set globally? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » JPA Certification (OCEJPA)
Bookmark "Why only cascade-persist can be set globally?" Watch "Why only cascade-persist can be set globally?" New topic

Why only cascade-persist can be set globally?

Leon Omk
Ranch Hand

Joined: Aug 17, 2010
Posts: 75 cascade-persist
The cascade-persist subelement applies to all relationships in the persistence unit.
Specifying this subelement adds the cascade persist option to all relationships in addition to any settings
specified in annotations or XML.
The cascade-persist subelement cannot be overridden in this release.
The ability to override the cascade-persist of the persistence-unit-defaults
element will be added in a future release of this specification.

Why can't other types, such as cascade-remove, cascade-refresh,etc. be set globally? Curious and can't figure out the answer.

OK, so that other guy knows Java better than I do, but I bet he can't speak Wuhanese(a Chinese Dialect) like me.
I agree. Here's the link: http://aspose.com/file-tools
subject: Why only cascade-persist can be set globally?
Similar Threads
Why we need to persistent unit in EJB 3.0 ?
JPA persist one-to-many relationship by non-owning side
hibernat creating the tables without cascade
Can't update a many-to-many relatonship
detached entity vs. removed entity