Steve Ebersole commented on Bug HHH-8167

The "error" is really just a warning message:

12:20:24,785  WARN TypeSafeActivator:193 - HHH000274: Unable to apply constraints on DDL for org.hibernate.test.formulajoin.AnnotatedMaster
java.lang.ClassCastException: org.hibernate.mapping.Formula cannot be cast to org.hibernate.mapping.Column
	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyNotNull(TypeSafeActivator.java:318)
	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyConstraints(TypeSafeActivator.java:251)
	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:213)
	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyRelationalConstraints(TypeSafeActivator.java:190)
	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyRelationalConstraints(TypeSafeActivator.java:158)
	at org.hibernate.cfg.beanvalidation.TypeSafeActivator.activate(TypeSafeActivator.java:110)
        ...

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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira