Dear OpenJPA community, I use the OpenJPA ReverseMappingTool to programmatically create my entities. The issues that I'm now encountering is the following error message:
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,