if ( attributeBinding.getHibernateTypeDescriptor().getExplicitType() != null ) {
return attributeBinding.getHibernateTypeDescriptor().getExplicitType(); // already resolved
}
// this only works for "basic" attribute types
HibernateTypeDescriptor typeDescriptor = attributeBinding.getHibernateTypeDescriptor();
if ( typeDescriptor == null || typeDescriptor.getTypeName() == null) {
throw new MappingException( "Hibernate type name has not been defined for attribute: " +
getQualifiedAttributeName( attributeBinding )
);
}
Type type = null;
if ( typeDescriptor.getTypeName() != null ) {
Properties typeParameters = null;
if ( typeDescriptor.getTypeParameters() != null ) {
typeParameters = new Properties();
typeParameters.putAll( typeDescriptor.getTypeParameters() );
}
type = metadata.getTypeResolver().heuristicType(
typeDescriptor.getTypeName(),
typeParameters
);
typeDescriptor.setExplicitType( type );
}
return type;
}