|
The code involved:
Class:org.hibernate.metamodel.source.annotations.attribute.ColumnValues
Method: applyColumnValues(AnnotationInstance)
Line 71 (according to the source attached to version 4.2.2.Final using ivy/maven):
AnnotationValue uniqueValue = columnAnnotation.value( "unique" );
if ( uniqueValue != null )
{
this.unique = nameValue.asBoolean();
}
Where nameValue should be uniqueValue.
This stops me from using the annotation:
@Column(name = "code", unique = true, nullable = false, length = 50)
The workaround is probably adding a unique-index using the @NaturalId, but this is non-standard.
(As this is only a copy/paste mistake I ticked the box 'Suitable for new contributors')
|