HHH-6563 : NullPointerException using annotations source if a unique constraint is not mapped with a constraint name

This commit is contained in:
Gail Badner 2011-08-09 14:06:27 -07:00
parent 5ee60b1ca4
commit 446fcc6af8
1 changed files with 1 additions and 1 deletions

View File

@ -630,7 +630,7 @@ public class EntityClass extends ConfiguredClass {
AnnotationInstance[] uniqueConstraints = value.asNestedArray();
for ( AnnotationInstance unique : uniqueConstraints ) {
String name = unique.value( "name" ).asString();
String name = unique.value( "name" ) == null ? null : unique.value( "name" ).asString();
String[] columnNames = unique.value( "columnNames" ).asStringArray();
UniqueConstraintSourceImpl uniqueConstraintSource =
new UniqueConstraintSourceImpl(