Repository « Validation « JPA Q&A





1. JPA Repository-Level Validation    forum.hibernate.org

I have an Administrator entity that has a property called Type. Administrators can be complete or limited. I need to ensure that, no matter what happens, there is always at least one complete administrator in the entity store. For deleting, persisting, and merging, this is not a problem, because I can add the check to the corresponding methods in the DAO. ...