I’m trying to impose a @Oneto7 association. I’d have imagined an attribute that specifies the target many value, but have found none.
If there is no such attribute, how else, in JPA/EclipseLink would one achieve it?
I’m trying to impose a @Oneto7 association. I’d have imagined an attribute that specifies
Share
You could use the Bean Validation API (JSR-303) – Hibernate Validator being the RI – and add a
Sizeconstraint on your collection:If you’re using JPA 1.0, have a look at this previous answer to see how to use Bean Validation with JPA 1.0.