I'm using Spring 4.1 with Hibernate and have entities annotated with @OneToMany, @ManyToOne, etc.
For a certain case, class A "has many" of class B, and class A is not valid if it does not have at least one class B associated with it.
Is there a simple way to express this validation or should I write a custom validator?