I have a bean class with several (customizable) internal constraints and one class level constraint. I would like to check the internal constraints before the class level constraint. The code is as follows:
@GroupSequence({ Inner.class, NewSlotBean.class }) @TotalBeanValid(groups = NewSlotBean.class) public class NewSlotBean { @DayMonthYearString(groups = Inner.class) private String slotDay; @TimeString(groups = Inner.class) private String slotBegin; @LengthString(groups = Inner.class) private String slotLength; } 
( Inner is just an empty interface lying somewhere).
However, when I try to run this, the class level restriction is not checked at all. When I try to define GroupSequence, for example
 @GroupSequence({ Inner.class, Outer.class }) 
(with Outer is a random interface), I get an exception:
 javax.validation.GroupDefinitionException: ...*.beans.NewSlotBean must be part of the redefined default group sequence. 
Does s / o know how to make sure class level constraints are checked after internal ones? (It seems that this was not the default! I had occasional problems with it that appear after a while.)
source share