Default cascade merge and persist seem like good things.

Default cascade delete (you didn't mention it here, but for completeness) seems wrong.

Craig

On Jun 24, 2008, at 11:05 AM, Pinaki Poddar wrote:


Hi,
 Default cascade behavior looks like a useful feature. What do others
think?

 Cascade operations currently are not defaulted.

But like many other behavior in OpenJPA, such behavior can be plugged-in.

 Here is a small class attached to do just that.

 To activate it, you need to configure persistence.xml as
   <property name="openjpa.MetaDataFactory"
value="cascade.CascadeMappingFactory(cascade='persist,merge')"/>

This will, by default, add 'PERSIST" and 'MERGE' to all relationships.
You can specify any of the valid CasacdeType enum values in a
comma-separated list in 'cascade'  attribute

http://www.nabble.com/file/p18096612/CascadeMappingFactory.class
CascadeMappingFactory.class
http://www.nabble.com/file/p18096612/CascadeMappingFactory.java
CascadeMappingFactory.java


--
View this message in context: 
http://www.nabble.com/openjpa---DBCP-tp17991707p18096612.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to