From 8ee2bfce64bfac0e54d2243f6c786803778b66ec Mon Sep 17 00:00:00 2001 From: Strong Liu Date: Tue, 14 Feb 2012 06:52:52 +0800 Subject: [PATCH] fixing org.hibernate.test.discriminator.SimpleInheritanceTest test failure --- .../org/hibernate/metamodel/internal/source/Binder.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/Binder.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/Binder.java index 3e66ac93e3..adfa0aa28c 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/Binder.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/Binder.java @@ -1219,9 +1219,8 @@ public class Binder { EMPTY_PROPERTIES ); } - } - - if ( resolvedType != null ) { + } else { + attributeBinding.getHibernateTypeDescriptor().setResolvedTypeMapping( resolvedType ); pushHibernateTypeInformationDownIfNeeded( attributeBinding, resolvedType ); } } @@ -1232,7 +1231,9 @@ public class Binder { } String typeName = determineTypeName( hibernateTypeDescriptor ); Properties typeParameters = getTypeParameters( hibernateTypeDescriptor ); - return getHeuristicType( typeName, typeParameters ); + Type type = getHeuristicType( typeName, typeParameters ); + hibernateTypeDescriptor.setResolvedTypeMapping( type ); + return type; } private static String determineTypeName(HibernateTypeDescriptor hibernateTypeDescriptor) {