mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 05:04:52 +00:00
HHH-6173 Fixing some bugs and adding some improvements pointed out by Strong
This commit is contained in:
parent
08ed4c1e80
commit
157d50b434
@ -38,6 +38,7 @@ public enum AttributeType {
|
||||
ONE_TO_MANY( JPADotNames.ONE_TO_MANY ),
|
||||
MANY_TO_ONE( JPADotNames.MANY_TO_ONE ),
|
||||
MANY_TO_MANY( JPADotNames.MANY_TO_MANY ),
|
||||
ELEMENT_COLLECTION( JPADotNames.ELEMENT_COLLECTION ),
|
||||
EMBEDDED( JPADotNames.EMBEDDED );
|
||||
|
||||
private final DotName annotationDotName;
|
||||
|
@ -175,27 +175,18 @@ public String toString() {
|
||||
}
|
||||
|
||||
private ConfiguredClassType determineType() {
|
||||
AnnotationInstance entityAnnotation = JandexHelper.getSingleAnnotation(
|
||||
classInfo, JPADotNames.ENTITY
|
||||
);
|
||||
if ( entityAnnotation != null ) {
|
||||
if ( classInfo.annotations().containsKey( JPADotNames.ENTITY ) ) {
|
||||
return ConfiguredClassType.ENTITY;
|
||||
}
|
||||
|
||||
AnnotationInstance mappedSuperClassAnnotation = JandexHelper.getSingleAnnotation(
|
||||
classInfo, JPADotNames.MAPPED_SUPERCLASS
|
||||
);
|
||||
if ( mappedSuperClassAnnotation != null ) {
|
||||
else if ( classInfo.annotations().containsKey( JPADotNames.MAPPED_SUPERCLASS ) ) {
|
||||
return ConfiguredClassType.MAPPED_SUPERCLASS;
|
||||
}
|
||||
|
||||
AnnotationInstance embeddableAnnotation = JandexHelper.getSingleAnnotation(
|
||||
classInfo, JPADotNames.EMBEDDABLE
|
||||
);
|
||||
if ( embeddableAnnotation != null ) {
|
||||
else if ( classInfo.annotations().containsKey( JPADotNames.EMBEDDABLE ) ) {
|
||||
return ConfiguredClassType.EMBEDDABLE;
|
||||
}
|
||||
return ConfiguredClassType.NON_ENTITY;
|
||||
else {
|
||||
return ConfiguredClassType.NON_ENTITY;
|
||||
}
|
||||
}
|
||||
|
||||
private AccessType determineClassAccessType(AccessType defaultAccessType) {
|
||||
|
@ -151,7 +151,7 @@ else if ( parent != null
|
||||
}
|
||||
|
||||
private IdType determineIdType() {
|
||||
List<AnnotationInstance> idAnnotations = getClassInfo().annotations().get( JPADotNames.ENTITY );
|
||||
List<AnnotationInstance> idAnnotations = getClassInfo().annotations().get( JPADotNames.ID );
|
||||
List<AnnotationInstance> embeddedIdAnnotations = getClassInfo()
|
||||
.annotations()
|
||||
.get( JPADotNames.EMBEDDED_ID );
|
||||
|
Loading…
x
Reference in New Issue
Block a user