From babefc8b9d2fbe852902c4173166be9abb3213db Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Mon, 14 Jun 2021 08:26:07 +0200 Subject: [PATCH] Fix AbstractEntityPersister#findSubpart returning the wrong ModelPart when the Entity has an attribute named id that it is not the identifier --- .../entity/AbstractEntityPersister.java | 95 ++++++------ .../IdPropertyInJoinedSubclassTest.java | 48 ++++-- .../IdPropertyInSingleTableSubclassTest.java | 141 ++++++++++++++++++ ...rtyInSubclassIdInMappedSuperclassTest.java | 62 +++++--- ...IdPropertyInTablePerClassSubclassTest.java | 61 +++++--- .../{ => orm}/test/idprops/LineItem.java | 2 +- .../{ => orm}/test/idprops/LineItemPK.java | 2 +- .../{ => orm}/test/idprops/Mapping.hbm.xml | 2 +- .../{ => orm}/test/idprops/Order.java | 2 +- .../{ => orm}/test/idprops/Person.java | 2 +- .../OneToOneWithDerivedIdentityTest.java | 9 +- .../IdPropertyInSingleTableSubclassTest.java | 116 -------------- .../IdentifierPropertyReferencesTest.java | 64 ++++---- 13 files changed, 351 insertions(+), 255 deletions(-) rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/IdPropertyInJoinedSubclassTest.java (68%) create mode 100644 hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInSingleTableSubclassTest.java rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/IdPropertyInSubclassIdInMappedSuperclassTest.java (58%) rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/IdPropertyInTablePerClassSubclassTest.java (57%) rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/LineItem.java (96%) rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/LineItemPK.java (97%) rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/Mapping.hbm.xml (97%) rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/Order.java (96%) rename hibernate-core/src/test/java/org/hibernate/{ => orm}/test/idprops/Person.java (95%) delete mode 100644 hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInSingleTableSubclassTest.java diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java index fbde1bf29d..92388388dd 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java @@ -6726,15 +6726,57 @@ public abstract class AbstractEntityPersister public ModelPart findSubPart(String name, EntityMappingType treatTargetType) { LOG.tracef( "#findSubPart(`%s`)", name ); + if ( EntityDiscriminatorMapping.matchesRoleName( name ) ) { + return discriminatorMapping; + } + final AttributeMapping declaredAttribute = declaredAttributeMappings.get( name ); if ( declaredAttribute != null ) { return declaredAttribute; } - if ( isIdentifierReference( name ) ) { - return identifierMapping; + if ( superMappingType != null ) { + final ModelPart superDefinedAttribute = superMappingType.findSubPart( name, superMappingType ); + if ( superDefinedAttribute != null ) { + return superDefinedAttribute; + } + } + else { + if ( subclassMappingTypes != null && !subclassMappingTypes.isEmpty() ) { + for ( EntityMappingType subMappingType : subclassMappingTypes.values() ) { + final ModelPart subDefinedAttribute = subMappingType.findSubTypesSubPart( name, treatTargetType ); + + if ( subDefinedAttribute != null ) { + return subDefinedAttribute; + } + } + } } + return getIdentifierModelPart( name, treatTargetType ); + } + + @Override + public ModelPart findSubTypesSubPart(String name, EntityMappingType treatTargetType) { + final AttributeMapping declaredAttribute = declaredAttributeMappings.get( name ); + if ( declaredAttribute != null ) { + return declaredAttribute; + } + + if ( subclassMappingTypes != null && !subclassMappingTypes.isEmpty() ) { + for ( EntityMappingType subMappingType : subclassMappingTypes.values() ) { + final ModelPart subDefinedAttribute = subMappingType.findSubTypesSubPart( name, treatTargetType ); + + if ( subDefinedAttribute != null ) { + return subDefinedAttribute; + } + } + } + + return null; + } + + private ModelPart getIdentifierModelPart(String name, EntityMappingType treatTargetType) { if ( identifierMapping instanceof NonAggregatedIdentifierMappingImpl ) { final ModelPart subPart = ( (NonAggregatedIdentifierMappingImpl) identifierMapping ).findSubPart( name, @@ -6745,51 +6787,10 @@ public abstract class AbstractEntityPersister } } - if ( superMappingType != null ) { - final ModelPart superDefinedAttribute = superMappingType.findSubPart( name, superMappingType ); - if ( superDefinedAttribute != null ) { - return superDefinedAttribute; - } - } - - if ( subclassMappingTypes != null && !subclassMappingTypes.isEmpty() ) { - for ( EntityMappingType subMappingType : subclassMappingTypes.values() ) { - final ModelPart subDefinedAttribute = subMappingType.findSubTypesSubPart( name, treatTargetType ); - - if ( subDefinedAttribute != null ) { - return subDefinedAttribute; - } - } - } - - if ( EntityDiscriminatorMapping.matchesRoleName( name ) ) { - return discriminatorMapping; - } - - return null; - } - - @Override - public ModelPart findSubTypesSubPart(String name, EntityMappingType treatTargetType) { if ( isIdentifierReference( name ) ) { return identifierMapping; } - final AttributeMapping declaredAttribute = declaredAttributeMappings.get( name ); - if ( declaredAttribute != null ) { - return declaredAttribute; - } - - if ( subclassMappingTypes != null && !subclassMappingTypes.isEmpty() ) { - for ( EntityMappingType subMappingType : subclassMappingTypes.values() ) { - final ModelPart subDefinedAttribute = subMappingType.findSubTypesSubPart( name, treatTargetType ); - - if ( subDefinedAttribute != null ) { - return subDefinedAttribute; - } - } - } - return null; } @@ -6798,12 +6799,12 @@ public abstract class AbstractEntityPersister return true; } - if ( entityMetamodel.hasNonIdentifierPropertyNamedId() ) { - return "id".equals( name ); + if ( hasIdentifierProperty() && getIdentifierPropertyName().equals( name ) ) { + return true; } - if ( hasIdentifierProperty() ) { - return getIdentifierPropertyName().equals( name ); + if ( !entityMetamodel.hasNonIdentifierPropertyNamedId() && "id".equals( name ) ) { + return true; } return false; diff --git a/hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInJoinedSubclassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInJoinedSubclassTest.java similarity index 68% rename from hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInJoinedSubclassTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInJoinedSubclassTest.java index 87b9b39b9c..4303133468 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInJoinedSubclassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInJoinedSubclassTest.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.idprops; +package org.hibernate.orm.test.idprops; import javax.persistence.Column; import javax.persistence.Entity; @@ -15,35 +15,47 @@ import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import org.hibernate.testing.TestForIssue; -import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.junit.Before; -import org.junit.Test; +import org.hibernate.testing.orm.junit.DomainModel; +import org.hibernate.testing.orm.junit.SessionFactory; +import org.hibernate.testing.orm.junit.SessionFactoryScope; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author Gail Badner */ -public class IdPropertyInJoinedSubclassTest extends BaseCoreFunctionalTestCase { - @Override - public Class[] getAnnotatedClasses() { - return new Class[] { Human.class, Genius.class }; - } +@DomainModel( + annotatedClasses = { + IdPropertyInJoinedSubclassTest.Human.class, + IdPropertyInJoinedSubclassTest.Genius.class + } +) +@SessionFactory +public class IdPropertyInJoinedSubclassTest { - @Before - public void setUp() { - doInHibernate( this::sessionFactory, session -> { + @BeforeEach + public void setUp(SessionFactoryScope scope) { + scope.inTransaction( session -> { session.persist( new Genius() ); session.persist( new Genius( 1L ) ); session.persist( new Genius( 1L ) ); } ); } + @AfterEach + public void tearDown(SessionFactoryScope scope) { + scope.inTransaction( session -> { + session.createQuery( "delete from Genius" ).executeUpdate(); + } ); + } + @Test @TestForIssue(jiraKey = "HHH-13114") - public void testHql() { - doInHibernate( this::sessionFactory, session -> { + public void testHql(SessionFactoryScope scope) { + scope.inTransaction( session -> { assertEquals( 2, session.createQuery( "from Genius g where g.id = :id", Genius.class ) .setParameter( "id", 1L ) @@ -82,6 +94,8 @@ public class IdPropertyInJoinedSubclassTest extends BaseCoreFunctionalTestCase { private Long realId; + private String name; + @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "realId") @@ -98,6 +112,8 @@ public class IdPropertyInJoinedSubclassTest extends BaseCoreFunctionalTestCase { public static class Genius extends Human { private Long id; + private int age; + public Genius() { } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInSingleTableSubclassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInSingleTableSubclassTest.java new file mode 100644 index 0000000000..9f03a51bd8 --- /dev/null +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInSingleTableSubclassTest.java @@ -0,0 +1,141 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * 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.orm.test.idprops; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; + +import org.hibernate.testing.TestForIssue; +import org.hibernate.testing.orm.junit.DomainModel; +import org.hibernate.testing.orm.junit.SessionFactory; +import org.hibernate.testing.orm.junit.SessionFactoryScope; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * @author Gail Badner + */ +@DomainModel( + annotatedClasses = { + IdPropertyInSingleTableSubclassTest.Human.class, + IdPropertyInSingleTableSubclassTest.Genius.class + } +) +@SessionFactory +public class IdPropertyInSingleTableSubclassTest { + + @BeforeEach + public void setUp(SessionFactoryScope scope) { + scope.inTransaction( session -> { + session.persist( new Genius() ); + session.persist( new Genius( 1L ) ); + session.persist( new Genius( 1L ) ); + } ); + } + + @AfterEach + public void tearDown(SessionFactoryScope scope) { + scope.inTransaction( + session -> + session.createQuery( "delete from Genius" ).executeUpdate() + ); + } + + @Test + @TestForIssue(jiraKey = "HHH-13114") + public void testHql(SessionFactoryScope scope) { + scope.inTransaction( + session -> { + assertEquals( + 2, + session.createQuery( + "from Genius g where g.id = :id", + Genius.class + ) + .setParameter( "id", 1L ) + .list() + .size() + ); + + assertEquals( + 1, + session.createQuery( "from Genius g where g.id is null", Genius.class ) + .list() + .size() + ); + + assertEquals( 3L, session.createQuery( "select count( g ) from Genius g" ).uniqueResult() ); + + assertEquals( + 2, + session.createQuery( "from Human h where h.id = :id", Human.class ) + .setParameter( "id", 1L ) + .list() + .size() + ); + + assertEquals( + 1, + session.createQuery( "from Human h where h.id is null", Human.class ) + .list() + .size() + ); + + assertEquals( 3L, session.createQuery( "select count( h ) from Human h" ).uniqueResult() ); + } ); + } + + @Entity(name = "Human") + @Inheritance(strategy = InheritanceType.SINGLE_TABLE) + public static class Human { + private Long realId; + + private String name; + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name = "realId") + public Long getRealId() { + return realId; + } + + public void setRealId(Long realId) { + this.realId = realId; + } + } + + @Entity(name = "Genius") + public static class Genius extends Human { + private Long id; + + private int age; + + public Genius() { + } + + public Genius(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + } + +} diff --git a/hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInSubclassIdInMappedSuperclassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInSubclassIdInMappedSuperclassTest.java similarity index 58% rename from hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInSubclassIdInMappedSuperclassTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInSubclassIdInMappedSuperclassTest.java index 8cbd837d38..b44bc45d26 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInSubclassIdInMappedSuperclassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInSubclassIdInMappedSuperclassTest.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.idprops; +package org.hibernate.orm.test.idprops; import javax.persistence.Column; import javax.persistence.Entity; @@ -16,44 +16,59 @@ import javax.persistence.InheritanceType; import javax.persistence.MappedSuperclass; import org.hibernate.testing.TestForIssue; -import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.junit.Before; -import org.junit.Test; +import org.hibernate.testing.orm.junit.DomainModel; +import org.hibernate.testing.orm.junit.SessionFactory; +import org.hibernate.testing.orm.junit.SessionFactoryScope; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author Gail Badner */ -public class IdPropertyInSubclassIdInMappedSuperclassTest extends BaseCoreFunctionalTestCase { - @Override - public Class[] getAnnotatedClasses() { - return new Class[] { Human.class, Genius.class }; - } +@DomainModel( + annotatedClasses = { + IdPropertyInSubclassIdInMappedSuperclassTest.Human.class, + IdPropertyInSubclassIdInMappedSuperclassTest.Genius.class + } +) +@SessionFactory +public class IdPropertyInSubclassIdInMappedSuperclassTest { - @Before - public void setUp() { - doInHibernate( this::sessionFactory, session -> { + @BeforeEach + public void setUp(SessionFactoryScope scope) { + scope.inTransaction( session -> { session.persist( new Genius() ); session.persist( new Genius( 1L ) ); session.persist( new Genius( 1L ) ); } ); } + @AfterEach + public void tearDown(SessionFactoryScope scope) { + scope.inTransaction( + session -> + session.createQuery( "delete from Genius" ).executeUpdate() + ); + } + @Test @TestForIssue(jiraKey = "HHH-13114") - public void testHql() { - doInHibernate( this::sessionFactory, session -> { + public void testHql(SessionFactoryScope scope) { + scope.inTransaction( session -> { assertEquals( - 2, session.createQuery( "from Genius g where g.id = :id", Genius.class ) + 2, + session.createQuery( "from Genius g where g.id = :id", Genius.class ) .setParameter( "id", 1L ) .list() .size() ); assertEquals( - 1, session.createQuery( "from Genius g where g.id is null", Genius.class ) + 1, + session.createQuery( "from Genius g where g.id is null", Genius.class ) .list() .size() ); @@ -61,14 +76,16 @@ public class IdPropertyInSubclassIdInMappedSuperclassTest extends BaseCoreFuncti assertEquals( 3L, session.createQuery( "select count( g ) from Genius g" ).uniqueResult() ); assertEquals( - 2, session.createQuery( "from Human h where h.id = :id", Human.class ) + 2, + session.createQuery( "from Human h where h.id = :id", Human.class ) .setParameter( "id", 1L ) .list() .size() ); assertEquals( - 1, session.createQuery( "from Human h where h.id is null", Human.class ) + 1, + session.createQuery( "from Human h where h.id is null", Human.class ) .list() .size() ); @@ -83,6 +100,8 @@ public class IdPropertyInSubclassIdInMappedSuperclassTest extends BaseCoreFuncti private Long realId; + private String description; + @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "realId") @@ -98,12 +117,15 @@ public class IdPropertyInSubclassIdInMappedSuperclassTest extends BaseCoreFuncti @Entity(name = "Human") @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public static class Human extends Animal { + private String name; } @Entity(name = "Genius") public static class Genius extends Human { private Long id; + private int age; + public Genius() { } diff --git a/hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInTablePerClassSubclassTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInTablePerClassSubclassTest.java similarity index 57% rename from hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInTablePerClassSubclassTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInTablePerClassSubclassTest.java index 5a0ce3f207..1057c2f8ed 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/idprops/IdPropertyInTablePerClassSubclassTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/IdPropertyInTablePerClassSubclassTest.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.idprops; +package org.hibernate.orm.test.idprops; import javax.persistence.Column; import javax.persistence.Entity; @@ -15,44 +15,59 @@ import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import org.hibernate.testing.TestForIssue; -import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.junit.Before; -import org.junit.Test; +import org.hibernate.testing.orm.junit.DomainModel; +import org.hibernate.testing.orm.junit.SessionFactory; +import org.hibernate.testing.orm.junit.SessionFactoryScope; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author Gail Badner */ -public class IdPropertyInTablePerClassSubclassTest extends BaseCoreFunctionalTestCase { - @Override - public Class[] getAnnotatedClasses() { - return new Class[] { Human.class, Genius.class }; - } +@DomainModel( + annotatedClasses = { + IdPropertyInTablePerClassSubclassTest.Human.class, + IdPropertyInTablePerClassSubclassTest.Genius.class + } +) +@SessionFactory +public class IdPropertyInTablePerClassSubclassTest { - @Before - public void setUp() { - doInHibernate( this::sessionFactory, session -> { + @BeforeEach + public void setUp(SessionFactoryScope scope) { + scope.inTransaction( session -> { session.persist( new Genius() ); session.persist( new Genius( 1L ) ); session.persist( new Genius( 1L ) ); } ); } + @AfterEach + public void tearDown(SessionFactoryScope scope) { + scope.inTransaction( + session -> + session.createQuery( "delete from Genius" ).executeUpdate() + ); + } + @Test @TestForIssue(jiraKey = "HHH-13114") - public void testHql() { - doInHibernate( this::sessionFactory, session -> { + public void testHql(SessionFactoryScope scope) { + scope.inTransaction( session -> { assertEquals( - 2, session.createQuery( "from Genius g where g.id = :id", Genius.class ) + 2, + session.createQuery( "from Genius g where g.id = :id", Genius.class ) .setParameter( "id", 1L ) .list() .size() ); assertEquals( - 1, session.createQuery( "from Genius g where g.id is null", Genius.class ) + 1, + session.createQuery( "from Genius g where g.id is null", Genius.class ) .list() .size() ); @@ -60,14 +75,16 @@ public class IdPropertyInTablePerClassSubclassTest extends BaseCoreFunctionalTes assertEquals( 3L, session.createQuery( "select count( g ) from Genius g" ).uniqueResult() ); assertEquals( - 2, session.createQuery( "from Human h where h.id = :id", Human.class ) + 2, + session.createQuery( "from Human h where h.id = :id", Human.class ) .setParameter( "id", 1L ) .list() .size() ); assertEquals( - 1, session.createQuery( "from Human h where h.id is null", Human.class ) + 1, + session.createQuery( "from Human h where h.id is null", Human.class ) .list() .size() ); @@ -82,6 +99,8 @@ public class IdPropertyInTablePerClassSubclassTest extends BaseCoreFunctionalTes public static class Human { private Long realId; + private String name; + @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "realId") @@ -98,6 +117,8 @@ public class IdPropertyInTablePerClassSubclassTest extends BaseCoreFunctionalTes public static class Genius extends Human { private Long id; + private int age; + public Genius() { } diff --git a/hibernate-core/src/test/java/org/hibernate/test/idprops/LineItem.java b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/LineItem.java similarity index 96% rename from hibernate-core/src/test/java/org/hibernate/test/idprops/LineItem.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/idprops/LineItem.java index 05452e4b41..0c619807b4 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/idprops/LineItem.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/LineItem.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.idprops; +package org.hibernate.orm.test.idprops; /** diff --git a/hibernate-core/src/test/java/org/hibernate/test/idprops/LineItemPK.java b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/LineItemPK.java similarity index 97% rename from hibernate-core/src/test/java/org/hibernate/test/idprops/LineItemPK.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/idprops/LineItemPK.java index 571c867302..1ae640e899 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/idprops/LineItemPK.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/LineItemPK.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.idprops; +package org.hibernate.orm.test.idprops; import java.io.Serializable; /** diff --git a/hibernate-core/src/test/java/org/hibernate/test/idprops/Mapping.hbm.xml b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/Mapping.hbm.xml similarity index 97% rename from hibernate-core/src/test/java/org/hibernate/test/idprops/Mapping.hbm.xml rename to hibernate-core/src/test/java/org/hibernate/orm/test/idprops/Mapping.hbm.xml index ddcea4bddb..abaa2e5216 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/idprops/Mapping.hbm.xml +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/idprops/Mapping.hbm.xml @@ -8,7 +8,7 @@ --> - +