Is MyClass indeed not overriding getId()? If so, that behavior is kinda expected, as you're trying to configure a non-existing element. Actually I think this even should raise an exception. It should work though if you declare the constraint for MyObject instead of MyClass. |