HHH-7542: Modified EntityClass to allow for multiple class-level @Immutable annotations in the same hierarchy
This commit is contained in:
parent
4882bebdba
commit
ee9b4d78cd
|
@ -285,10 +285,8 @@ public class EntityClass extends ConfiguredClass {
|
||||||
}
|
}
|
||||||
optimisticLockStyle = OptimisticLockStyle.valueOf( optimisticLockType.name() );
|
optimisticLockStyle = OptimisticLockStyle.valueOf( optimisticLockType.name() );
|
||||||
|
|
||||||
final AnnotationInstance hibernateImmutableAnnotation = JandexHelper.getSingleAnnotation(
|
List< AnnotationInstance > hibernateImmutableAnnotations = getClassInfo().annotations().get( HibernateDotNames.IMMUTABLE );
|
||||||
getClassInfo(), HibernateDotNames.IMMUTABLE
|
isMutable = ( hibernateImmutableAnnotations == null || hibernateImmutableAnnotations.isEmpty() )
|
||||||
);
|
|
||||||
isMutable = hibernateImmutableAnnotation == null
|
|
||||||
&& hibernateEntityAnnotation != null
|
&& hibernateEntityAnnotation != null
|
||||||
&& hibernateEntityAnnotation.value( "mutable" ) != null
|
&& hibernateEntityAnnotation.value( "mutable" ) != null
|
||||||
&& hibernateEntityAnnotation.value( "mutable" ).asBoolean();
|
&& hibernateEntityAnnotation.value( "mutable" ).asBoolean();
|
||||||
|
|
Loading…
Reference in New Issue