diff --git a/hibernate-core/src/main/java/org/hibernate/boot/registry/classloading/spi/ClassLoaderService.java b/hibernate-core/src/main/java/org/hibernate/boot/registry/classloading/spi/ClassLoaderService.java index 45c1fdb379..0144810c9d 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/registry/classloading/spi/ClassLoaderService.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/registry/classloading/spi/ClassLoaderService.java @@ -33,6 +33,30 @@ public interface ClassLoaderService extends Service, Stoppable { */ Class classForName(String className); + @SuppressWarnings("unchecked") + default Class classForTypeName(String className) { + switch ( className ) { + case "boolean": + return (Class) boolean.class; + case "byte": + return (Class) byte.class; + case "char": + return (Class) char.class; + case "short": + return (Class) short.class; + case "int": + return (Class) int.class; + case "float": + return (Class) float.class; + case "long": + return (Class) long.class; + case "double": + return (Class) double.class; + default: + return classForName( className ); + } + } + /** * Locate a resource by name (classpath lookup). * diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java index feb9896cee..6ff6aea621 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/BasicValueBinder.java @@ -61,6 +61,7 @@ import org.hibernate.type.descriptor.java.MutabilityPlan; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; import org.hibernate.type.spi.TypeConfiguration; +import org.hibernate.usertype.DynamicParameterizedType; import org.jboss.logging.Logger; @@ -103,6 +104,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { private Function explicitMutabilityAccess; private Function implicitJavaTypeAccess; + private XProperty xproperty; private AccessType accessType; private ConverterDescriptor converterDescriptor; @@ -225,6 +227,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { XClass modelPropertyTypeXClass, String declaringClassName, ConverterDescriptor converterDescriptor) { + this.xproperty = modelXProperty; boolean isArray = modelXProperty.isArray(); if ( modelPropertyTypeXClass == null && !isArray ) { // we cannot guess anything @@ -365,10 +368,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { if ( implicitJavaType.isEnum() ) { final MapKeyEnumerated enumeratedAnn = mapAttribute.getAnnotation( MapKeyEnumerated.class ); - if ( enumeratedAnn == null ) { - enumType = EnumType.ORDINAL; - } - else { + if ( enumeratedAnn != null ) { enumType = enumeratedAnn.value(); //noinspection ConstantConditions if ( enumType == null ) { @@ -428,10 +428,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { if ( javaType.isEnum() ) { final Enumerated enumeratedAnn = attributeXProperty.getAnnotation( Enumerated.class ); - if ( enumeratedAnn == null ) { - enumType = EnumType.ORDINAL; - } - else { + if ( enumeratedAnn != null ) { enumType = enumeratedAnn.value(); if ( enumType == null ) { throw new IllegalStateException( @@ -474,10 +471,7 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { if ( javaType.isEnum() ) { final Enumerated enumeratedAnn = attributeDescriptor.getAnnotation( Enumerated.class ); - if ( enumeratedAnn == null ) { - this.enumType = EnumType.ORDINAL; - } - else { + if ( enumeratedAnn != null ) { this.enumType = enumeratedAnn.value(); if ( this.enumType == null ) { throw new IllegalStateException( @@ -812,6 +806,26 @@ public class BasicValueBinder implements JdbcTypeDescriptorIndicators { basicValue.setExplicitTypeName( explicitBasicTypeName ); basicValue.setExplicitTypeParams( explicitLocalTypeParams ); + // todo (6.0): Ideally we could check the type class like we did in 5.5 but that is unavailable at this point + java.lang.reflect.Type type = implicitJavaTypeAccess == null ? null : implicitJavaTypeAccess.apply( getTypeConfiguration() ); + if ( xproperty != null && returnedClassName != null && ( !(type instanceof Class) || !( (Class) type ).isPrimitive() ) ) { +// if ( typeClass != null && DynamicParameterizedType.class.isAssignableFrom( typeClass ) ) { + final Map parameters = new HashMap<>(); + parameters.put( DynamicParameterizedType.IS_DYNAMIC, Boolean.toString( true ) ); + parameters.put( DynamicParameterizedType.RETURNED_CLASS, returnedClassName ); + parameters.put( DynamicParameterizedType.IS_PRIMARY_KEY, Boolean.toString( kind == Kind.MAP_KEY ) ); + + parameters.put( DynamicParameterizedType.ENTITY, persistentClassName ); + parameters.put( DynamicParameterizedType.XPROPERTY, xproperty ); + parameters.put( DynamicParameterizedType.PROPERTY, xproperty.getName() ); + if ( accessType != null ) { + parameters.put( DynamicParameterizedType.ACCESS_TYPE, accessType.getType() ); + } + if ( explicitLocalTypeParams != null ) { + parameters.putAll( explicitLocalTypeParams ); + } + basicValue.setTypeParameters( (Map) parameters ); + } basicValue.setJpaAttributeConverterDescriptor( converterDescriptor ); diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java index 90674c3831..172681c513 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/BasicValue.java @@ -7,6 +7,7 @@ package org.hibernate.mapping; import java.util.Map; +import java.util.Properties; import java.util.function.Function; import javax.persistence.AttributeConverter; import javax.persistence.EnumType; @@ -48,6 +49,7 @@ import org.hibernate.type.descriptor.java.TemporalJavaTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptor; import org.hibernate.type.descriptor.jdbc.JdbcTypeDescriptorIndicators; import org.hibernate.type.spi.TypeConfiguration; +import org.hibernate.usertype.DynamicParameterizedType; /** * @author Steve Ebersole @@ -277,6 +279,12 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat } protected Resolution buildResolution() { + Properties typeParameters = getTypeParameters(); + if ( typeParameters != null + && Boolean.parseBoolean( typeParameters.getProperty( DynamicParameterizedType.IS_DYNAMIC ) ) + && typeParameters.get( DynamicParameterizedType.PARAMETER_TYPE ) == null ) { + createParameterImpl(); + } if ( explicitTypeName != null ) { return interpretExplicitlyNamedType( explicitTypeName, @@ -286,7 +294,7 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat explicitSqlTypeAccess, explicitMutabilityPlanAccess, getAttributeConverterDescriptor(), - explicitLocalTypeParams, + typeParameters, this, typeConfiguration, getBuildingContext() @@ -363,10 +371,10 @@ public class BasicValue extends SimpleValue implements JdbcTypeDescriptorIndicat final TypeDefinitionRegistry typeDefinitionRegistry = getBuildingContext().getTypeDefinitionRegistry(); final TypeDefinition autoAppliedTypeDef = typeDefinitionRegistry.resolveAutoApplied( (BasicJavaDescriptor) jtd ); - if ( autoAppliedTypeDef != null ) { + if ( autoAppliedTypeDef != null && ( !jtd.getJavaTypeClass().isEnum() || enumerationStyle == null ) ) { log.debug( "BasicValue resolution matched auto-applied type-definition" ); return autoAppliedTypeDef.resolve( - getTypeParameters(), + typeParameters, null, getBuildingContext(), this diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java index c472805cfd..4b9b444610 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java @@ -818,7 +818,7 @@ public abstract class SimpleValue implements KeyValue { this.attributeConverterDescriptor = descriptor; } - private void createParameterImpl() { + protected void createParameterImpl() { try { final String[] columnNames = new String[ columns.size() ]; final Long[] columnLengths = new Long[ columns.size() ]; @@ -845,7 +845,7 @@ public abstract class SimpleValue implements KeyValue { typeParameters.put( DynamicParameterizedType.PARAMETER_TYPE, new ParameterTypeImpl( - classLoaderService.classForName( + classLoaderService.classForTypeName( typeParameters.getProperty( DynamicParameterizedType.RETURNED_CLASS ) ), annotations, diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java index 24e168e983..ed096c5bb0 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java @@ -352,14 +352,6 @@ public class MappingModelCreationHelper { final ValueGeneration valueGeneration = bootProperty.getValueGenerationStrategy(); if ( valueConverter != null ) { - if ( isAttrFormula ) { - throw new MappingException( String.format( - "Value converter should not be set for column [%s] annotated with @Formula [%s]", - attrName, - attrColumnName - ) ); - } - // we want to "decompose" the "type" into its various pieces as expected by the mapping assert valueConverter.getRelationalJavaDescriptor() == resolution.getRelationalJavaDescriptor(); @@ -386,7 +378,7 @@ public class MappingModelCreationHelper { fetchStyle, tableExpression, attrColumnName, - false, + isAttrFormula, null, null, valueConverter, diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EntityEnum.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EntityEnum.java similarity index 85% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EntityEnum.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EntityEnum.java index 88fb2573c8..bdc46b1e93 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EntityEnum.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EntityEnum.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated; +package org.hibernate.orm.test.annotations.enumerated; import java.util.HashSet; import java.util.Set; @@ -23,11 +23,11 @@ import org.hibernate.annotations.Formula; import org.hibernate.annotations.Type; import org.hibernate.annotations.TypeDef; -import org.hibernate.test.annotations.enumerated.custom_types.LastNumberType; -import org.hibernate.test.annotations.enumerated.enums.Common; -import org.hibernate.test.annotations.enumerated.enums.FirstLetter; -import org.hibernate.test.annotations.enumerated.enums.LastNumber; -import org.hibernate.test.annotations.enumerated.enums.Trimmed; +import org.hibernate.orm.test.annotations.enumerated.custom_types.LastNumberType; +import org.hibernate.orm.test.annotations.enumerated.enums.Common; +import org.hibernate.orm.test.annotations.enumerated.enums.FirstLetter; +import org.hibernate.orm.test.annotations.enumerated.enums.LastNumber; +import org.hibernate.orm.test.annotations.enumerated.enums.Trimmed; /** * @author Janario Oliveira @@ -43,7 +43,7 @@ public class EntityEnum { private Common ordinal; @Enumerated(EnumType.STRING) private Common string; - @Type(type = "org.hibernate.test.annotations.enumerated.custom_types.FirstLetterType") + @Type(type = "org.hibernate.orm.test.annotations.enumerated.custom_types.FirstLetterType") private FirstLetter firstLetter; private LastNumber lastNumber; @Enumerated(EnumType.STRING) diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EnumeratedSmokeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EnumeratedSmokeTest.java similarity index 96% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EnumeratedSmokeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EnumeratedSmokeTest.java index 2b1b94a6b5..a8fc15cd40 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EnumeratedSmokeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EnumeratedSmokeTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated; +package org.hibernate.orm.test.annotations.enumerated; import java.sql.Types; import javax.persistence.Entity; @@ -75,7 +75,7 @@ public class EnumeratedSmokeTest extends BaseUnitTestCase { final org.hibernate.type.EnumType hibernateMappingEnumType = (org.hibernate.type.EnumType) customType.getUserType(); assertThat( hibernateMappingEnumType.isOrdinal(), is(expectedJpaEnumType==EnumType.ORDINAL) ); assertThat( hibernateMappingEnumType.sqlTypes().length, is(1) ); - assertThat( hibernateMappingEnumType.sqlTypes()[0], is(expectedJpaEnumType==EnumType.ORDINAL? Types.INTEGER:Types.VARCHAR) ); + assertThat( hibernateMappingEnumType.sqlTypes()[0], is(expectedJpaEnumType==EnumType.ORDINAL? Types.TINYINT:Types.VARCHAR) ); } @Entity diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EnumeratedTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EnumeratedTypeTest.java similarity index 95% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EnumeratedTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EnumeratedTypeTest.java index 15aab36ed8..c2c8af4ef9 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/EnumeratedTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/EnumeratedTypeTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated; +package org.hibernate.orm.test.annotations.enumerated; import java.sql.Connection; import java.sql.SQLException; @@ -12,13 +12,12 @@ import java.sql.Statement; import java.util.List; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Join; -import javax.persistence.criteria.JoinType; import javax.persistence.criteria.Root; import org.hibernate.Session; import org.hibernate.dialect.AbstractHANADialect; import org.hibernate.dialect.Oracle8iDialect; +import org.hibernate.dialect.OracleDialect; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.mapping.PersistentClass; import org.hibernate.query.Query; @@ -28,12 +27,12 @@ import org.hibernate.type.Type; import org.hibernate.testing.SkipForDialect; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; -import org.hibernate.test.annotations.enumerated.custom_types.FirstLetterType; -import org.hibernate.test.annotations.enumerated.custom_types.LastNumberType; -import org.hibernate.test.annotations.enumerated.enums.Common; -import org.hibernate.test.annotations.enumerated.enums.FirstLetter; -import org.hibernate.test.annotations.enumerated.enums.LastNumber; -import org.hibernate.test.annotations.enumerated.enums.Trimmed; +import org.hibernate.orm.test.annotations.enumerated.custom_types.FirstLetterType; +import org.hibernate.orm.test.annotations.enumerated.custom_types.LastNumberType; +import org.hibernate.orm.test.annotations.enumerated.enums.Common; +import org.hibernate.orm.test.annotations.enumerated.enums.FirstLetter; +import org.hibernate.orm.test.annotations.enumerated.enums.LastNumber; +import org.hibernate.orm.test.annotations.enumerated.enums.Trimmed; import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -249,8 +248,7 @@ public class EnumeratedTypeTest extends BaseNonConfigCoreFunctionalTestCase { CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder(); CriteriaQuery criteria = criteriaBuilder.createQuery( EntityEnum.class ); Root root = criteria.from( EntityEnum.class ); - Join ordinal = root.join( "ordinal", JoinType.INNER ); - criteria.where( criteriaBuilder.equal( ordinal, Common.A1 ) ); + criteria.where( criteriaBuilder.equal( root.get( "ordinal" ), Common.A1 ) ); entityEnum = session.createQuery( criteria ).uniqueResult(); // entityEnum = (EntityEnum) session.createCriteria( EntityEnum.class ) @@ -385,7 +383,7 @@ public class EnumeratedTypeTest extends BaseNonConfigCoreFunctionalTestCase { @Test @TestForIssue(jiraKey = "HHH-4699") - @SkipForDialect(value = { Oracle8iDialect.class, AbstractHANADialect.class }, jiraKey = "HHH-8516", + @SkipForDialect(value = { OracleDialect.class, AbstractHANADialect.class }, jiraKey = "HHH-8516", comment = "HHH-4699 was specifically for using a CHAR, but Oracle/HANA do not handle the 2nd query correctly without VARCHAR. ") public void testTrimmedEnumChar() throws SQLException { // use native SQL to insert, forcing whitespace to occur diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_mapkey/EntityMapEnum.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_mapkey/EntityMapEnum.java similarity index 76% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_mapkey/EntityMapEnum.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_mapkey/EntityMapEnum.java index 4cd14dcad0..d6b5e4316e 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_mapkey/EntityMapEnum.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_mapkey/EntityMapEnum.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.custom_mapkey; +package org.hibernate.orm.test.annotations.enumerated.custom_mapkey; import java.util.HashMap; import java.util.Map; @@ -20,11 +20,11 @@ import javax.persistence.MapKeyEnumerated; import org.hibernate.annotations.MapKeyType; import org.hibernate.annotations.Type; import org.hibernate.annotations.TypeDef; +import org.hibernate.orm.test.annotations.enumerated.custom_types.LastNumberType; -import org.hibernate.test.annotations.enumerated.custom_types.LastNumberType; -import org.hibernate.test.annotations.enumerated.enums.Common; -import org.hibernate.test.annotations.enumerated.enums.FirstLetter; -import org.hibernate.test.annotations.enumerated.enums.LastNumber; +import org.hibernate.orm.test.annotations.enumerated.enums.Common; +import org.hibernate.orm.test.annotations.enumerated.enums.FirstLetter; +import org.hibernate.orm.test.annotations.enumerated.enums.LastNumber; /** * @author Janario Oliveira @@ -42,7 +42,7 @@ public class EntityMapEnum { @MapKeyEnumerated(EnumType.STRING) Map stringMap = new HashMap(); @ElementCollection - @MapKeyType(@Type(type = "org.hibernate.test.annotations.enumerated.custom_types.FirstLetterType")) + @MapKeyType(@Type(type = "org.hibernate.orm.test.annotations.enumerated.custom_types.FirstLetterType")) Map firstLetterMap = new HashMap(); @ElementCollection Map lastNumberMap = new HashMap(); diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_mapkey/MapKeyCustomEnumTypeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_mapkey/MapKeyCustomEnumTypeTest.java similarity index 95% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_mapkey/MapKeyCustomEnumTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_mapkey/MapKeyCustomEnumTypeTest.java index 8cc3c51c88..f8da5ab571 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_mapkey/MapKeyCustomEnumTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_mapkey/MapKeyCustomEnumTypeTest.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.custom_mapkey; +package org.hibernate.orm.test.annotations.enumerated.custom_mapkey; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; @@ -22,11 +22,11 @@ import org.hibernate.type.EnumType; import org.hibernate.type.Type; import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; -import org.hibernate.test.annotations.enumerated.custom_types.FirstLetterType; -import org.hibernate.test.annotations.enumerated.custom_types.LastNumberType; -import org.hibernate.test.annotations.enumerated.enums.Common; -import org.hibernate.test.annotations.enumerated.enums.FirstLetter; -import org.hibernate.test.annotations.enumerated.enums.LastNumber; +import org.hibernate.orm.test.annotations.enumerated.custom_types.FirstLetterType; +import org.hibernate.orm.test.annotations.enumerated.custom_types.LastNumberType; +import org.hibernate.orm.test.annotations.enumerated.enums.Common; +import org.hibernate.orm.test.annotations.enumerated.enums.FirstLetter; +import org.hibernate.orm.test.annotations.enumerated.enums.LastNumber; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_types/FirstLetterType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_types/FirstLetterType.java similarity index 95% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_types/FirstLetterType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_types/FirstLetterType.java index 1226e8cb33..788c0003c6 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_types/FirstLetterType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_types/FirstLetterType.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.custom_types; +package org.hibernate.orm.test.annotations.enumerated.custom_types; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_types/LastNumberType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_types/LastNumberType.java similarity index 95% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_types/LastNumberType.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_types/LastNumberType.java index e5231cccb3..0fe0f24ed4 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/custom_types/LastNumberType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/custom_types/LastNumberType.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.custom_types; +package org.hibernate.orm.test.annotations.enumerated.custom_types; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/Common.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/Common.java similarity index 84% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/Common.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/Common.java index 42a82dd515..eed3ae7464 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/Common.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/Common.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.enums; +package org.hibernate.orm.test.annotations.enumerated.enums; /** * @author Janario Oliveira diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/FirstLetter.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/FirstLetter.java similarity index 85% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/FirstLetter.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/FirstLetter.java index d128bb5673..0949b83107 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/FirstLetter.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/FirstLetter.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.enums; +package org.hibernate.orm.test.annotations.enumerated.enums; /** * @author Janario Oliveira diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/LastNumber.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/LastNumber.java similarity index 85% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/LastNumber.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/LastNumber.java index 2f38f19e75..50ee7be4b5 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/LastNumber.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/LastNumber.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.enums; +package org.hibernate.orm.test.annotations.enumerated.enums; /** * @author Janario Oliveira diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/Trimmed.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/Trimmed.java similarity index 84% rename from hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/Trimmed.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/Trimmed.java index c0f8ba6872..de90e7bf4b 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/enums/Trimmed.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/enums/Trimmed.java @@ -4,7 +4,7 @@ * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ -package org.hibernate.test.annotations.enumerated.enums; +package org.hibernate.orm.test.annotations.enumerated.enums; /** * @author Janario Oliveira