HHH-6520 Construction of type resolver needs to be deferred
This commit is contained in:
parent
f2338af9eb
commit
b8cc897bee
|
@ -46,9 +46,9 @@ import org.hibernate.metamodel.source.annotations.JPADotNames;
|
||||||
import org.hibernate.metamodel.source.annotations.JandexHelper;
|
import org.hibernate.metamodel.source.annotations.JandexHelper;
|
||||||
import org.hibernate.metamodel.source.annotations.TypeEnumConversionHelper;
|
import org.hibernate.metamodel.source.annotations.TypeEnumConversionHelper;
|
||||||
import org.hibernate.metamodel.source.annotations.attribute.type.AttributeTypeResolver;
|
import org.hibernate.metamodel.source.annotations.attribute.type.AttributeTypeResolver;
|
||||||
import org.hibernate.metamodel.source.annotations.attribute.type.AttributeTypeResolverImpl;
|
|
||||||
import org.hibernate.metamodel.source.annotations.attribute.type.CompositeAttributeTypeResolver;
|
import org.hibernate.metamodel.source.annotations.attribute.type.CompositeAttributeTypeResolver;
|
||||||
import org.hibernate.metamodel.source.annotations.attribute.type.EnumeratedTypeResolver;
|
import org.hibernate.metamodel.source.annotations.attribute.type.EnumeratedTypeResolver;
|
||||||
|
import org.hibernate.metamodel.source.annotations.attribute.type.AttributeTypeResolverImpl;
|
||||||
import org.hibernate.metamodel.source.annotations.attribute.type.LobTypeResolver;
|
import org.hibernate.metamodel.source.annotations.attribute.type.LobTypeResolver;
|
||||||
import org.hibernate.metamodel.source.annotations.attribute.type.TemporalTypeResolver;
|
import org.hibernate.metamodel.source.annotations.attribute.type.TemporalTypeResolver;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public class BasicAttribute extends MappedAttribute {
|
||||||
private final String customWriteFragment;
|
private final String customWriteFragment;
|
||||||
private final String customReadFragment;
|
private final String customReadFragment;
|
||||||
private final String checkCondition;
|
private final String checkCondition;
|
||||||
private final AttributeTypeResolver resolver;
|
private AttributeTypeResolver resolver;
|
||||||
|
|
||||||
public static BasicAttribute createSimpleAttribute(String name,
|
public static BasicAttribute createSimpleAttribute(String name,
|
||||||
Class<?> attributeType,
|
Class<?> attributeType,
|
||||||
|
@ -156,7 +156,6 @@ public class BasicAttribute extends MappedAttribute {
|
||||||
this.customReadFragment = readWrite[0];
|
this.customReadFragment = readWrite[0];
|
||||||
this.customWriteFragment = readWrite[1];
|
this.customWriteFragment = readWrite[1];
|
||||||
this.checkCondition = parseCheckAnnotation();
|
this.checkCondition = parseCheckAnnotation();
|
||||||
this.resolver = getDefaultHibernateTypeResolver();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final ColumnValues getColumnValues() {
|
public final ColumnValues getColumnValues() {
|
||||||
|
@ -359,6 +358,9 @@ public class BasicAttribute extends MappedAttribute {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AttributeTypeResolver getHibernateTypeResolver() {
|
public AttributeTypeResolver getHibernateTypeResolver() {
|
||||||
|
if ( resolver == null ) {
|
||||||
|
resolver = getDefaultHibernateTypeResolver();
|
||||||
|
}
|
||||||
return resolver;
|
return resolver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue