Search code examples
jpabean-validationopenjpa

Specify bean validation group prior to merge/persist?


How (or can) I specify programmatically which validation group OpenJPA should validate against during a persist or merge operation? Is this option only available via persistence.xml?

I'm drawing a blank.

Thanks.


Solution

  • Yes, configuration is only via persistence.xml. I guess it would be open for JPA implementations to provide implementation specific ways, but that's not standardized. I am not sure whether OpenJPa offers such a provider specific option, but I don't think so.