Is custom constraints the way to go or is there a better approach? Before persisting the class/entity below I want to make sure.
(!(a == null && b == null && c == null))
public class Foo{
String a;
String b;
String c;
}
How to do this with Hibernate/Hibernate validator?
Edit: @NotNull on fields are not good enough. They can all be only but no the same time.