Given a mapping like
where Titel is a subtype of a DomainValue:
base class DomainValue
the @NotNull leads to a class cast exception while starting the persistence unit:
Mapping seams to work, though. But i guess the validation isnt't in place.
Java 7, Spring 3.2
Could you reproduce the problem? The mapping is somewhat complicated (It's a very legacy scheme you might have guessed) but i could try to extract the problematic classes. Anyway, thanks for looking at it.
The "error" is really just a warning message:
So, not a bug. I assume what you want instead is for this to be logged in a more descriptive way.
Here, in this particular example, applying the not-null to just the column and ignoring the formula is fine. Still think it should be logged, but I'll log it in a more descriptive way, without the stack.
Aaah, i see. Yeah, those who do read have some advantages. "Unable to apply constraints on DDL". So the validator will kick in?
Thanks for clarifying (and i think a better message would be great nevertheless).