openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tester <>
Subject Set cascading-persist gobally or through ReverseMappingTool
Date Sun, 30 Nov 2014 15:21:13 GMT
Dear OpenJPA community,

I use the OpenJPA ReverseMappingTool to programmatically create my
entities. The issues that I'm now encountering is the following error

Suggested actions: a) Set the cascade attribute for this field to
CascadeType.PERSIST or CascadeType.ALL (JPA annotations) or "persist" or
"all" (JPA orm.xml),
 b) enable cascade-persist globally,
 c) ...

I see 3 possible solutions to change the CascadingType to Persist (the
ReverseMappingTool puts CascadinType.Merge by default it seems):
1) Pass a configuration to the ReverseMappingTool to add
CascadingType.Persist instead of the default CascadingType.Merge

=> I have been looking in the docs of the ReverseMappingTool, but I cannot
find a way to set it. Am I overlooking something?
2) Set CascadingType.Persist globally in a programmatic way.

=> I looked to add it through the JDBCConfiguration/OpenJPAConfiguration or
EntityManager, but here I still don't see way to set this globally
3) Manipulate the generated entity files. This is definitely possible, but
I would prefer option 1 or 2.

Anybody has an idea on how to achieve point 1 or 2?

Kind regards,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message