From 439ff8dcf7c3de0127a51cb0803d0764186f4a4c Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Mon, 18 Mar 2024 13:34:44 -0500 Subject: [PATCH] HHH-17460 - Ongoing JPA 32 work --- .../jaxb/mapping/spi/JaxbEmbeddedMapping.java | 2 + .../mapping/spi/JaxbPersistentAttribute.java | 1 - .../process/spi/MetadataBuildingProcess.java | 7 +- .../spi/ManagedResourcesProcessor.java | 7 +- .../xml/internal/ManagedTypeProcessor.java | 77 +-------- .../xml/internal/XmlDocumentContextImpl.java | 11 +- .../models/xml/spi/XmlDocumentContext.java | 163 +++++++++++++++++- .../boot/models/xml/spi/XmlProcessor.java | 7 +- .../models/xml/dynamic/DynamicModelTests.java | 2 +- .../boot/models/xml/dynamic/RowIdTest.java | 2 +- .../dynamic/dynamic-named-entity-graph.xml | 31 ++-- .../mappings/models/dynamic/dynamic-rowid.xml | 2 +- .../models/dynamic/dynamic-semi-simple.xml | 2 +- .../models/dynamic/dynamic-simple.xml | 2 +- .../models/dynamic/dynamic-tenantid.xml | 9 +- 15 files changed, 224 insertions(+), 101 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbEmbeddedMapping.java b/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbEmbeddedMapping.java index 0ecf127c90..334a9e2c95 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbEmbeddedMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbEmbeddedMapping.java @@ -13,4 +13,6 @@ package org.hibernate.boot.jaxb.mapping.spi; * @author Steve Ebersole */ public interface JaxbEmbeddedMapping extends JaxbSingularAttribute { + String getTarget(); + void setTarget(String target); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbPersistentAttribute.java b/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbPersistentAttribute.java index 9a351bfba0..d74643cfa4 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbPersistentAttribute.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbPersistentAttribute.java @@ -7,7 +7,6 @@ package org.hibernate.boot.jaxb.mapping.spi; import jakarta.persistence.AccessType; -import jakarta.persistence.FetchType; /** * Common interface for JAXB bindings that represent persistent attributes. diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java b/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java index b41dc4fb0e..4f51652e7d 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java @@ -442,7 +442,12 @@ public class MetadataBuildingProcess { sourceModelBuildingContext ); - final XmlProcessingResult xmlProcessingResult = XmlProcessor.processXml( xmlPreProcessingResult, modelCategorizationCollector, sourceModelBuildingContext ); + final XmlProcessingResult xmlProcessingResult = XmlProcessor.processXml( + xmlPreProcessingResult, + modelCategorizationCollector, + sourceModelBuildingContext, + bootstrapContext + ); final HashSet categorizedClassNames = new HashSet<>(); allKnownClassNames.forEach( (className) -> applyKnownClass( diff --git a/hibernate-core/src/main/java/org/hibernate/boot/models/categorize/spi/ManagedResourcesProcessor.java b/hibernate-core/src/main/java/org/hibernate/boot/models/categorize/spi/ManagedResourcesProcessor.java index bda03b4ebc..9feb162e12 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/models/categorize/spi/ManagedResourcesProcessor.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/models/categorize/spi/ManagedResourcesProcessor.java @@ -133,7 +133,12 @@ public class ManagedResourcesProcessor { sourceModelBuildingContext ); - final XmlProcessingResult xmlProcessingResult = XmlProcessor.processXml( xmlPreProcessingResult, modelCategorizationCollector, sourceModelBuildingContext ); + final XmlProcessingResult xmlProcessingResult = XmlProcessor.processXml( + xmlPreProcessingResult, + modelCategorizationCollector, + sourceModelBuildingContext, + bootstrapContext + ); allKnownClassNames.forEach( (className) -> { final ClassDetails classDetails = classDetailsRegistry.resolveClassDetails( className ); diff --git a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/ManagedTypeProcessor.java b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/ManagedTypeProcessor.java index 51a2c18f8c..97b6864d96 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/ManagedTypeProcessor.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/ManagedTypeProcessor.java @@ -374,81 +374,8 @@ public class ManagedTypeProcessor { private static TypeDetails determineDynamicAttributeJavaType( JaxbPersistentAttribute jaxbPersistentAttribute, XmlDocumentContext xmlDocumentContext) { - final ClassDetailsRegistry classDetailsRegistry = xmlDocumentContext.getModelBuildingContext().getClassDetailsRegistry(); - - if ( jaxbPersistentAttribute instanceof JaxbIdImpl jaxbId ) { - final MutableClassDetails classDetails = xmlDocumentContext.resolveJavaType( jaxbId.getTarget() ); - return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS ); - } - - if ( jaxbPersistentAttribute instanceof JaxbEmbeddedIdImpl jaxbEmbeddedId ) { - final String target = jaxbEmbeddedId.getTarget(); - if ( StringHelper.isEmpty( target ) ) { - return null; - } - final ClassDetails classDetails = classDetailsRegistry.resolveClassDetails( - target, - (name) -> new DynamicClassDetails( target, xmlDocumentContext.getModelBuildingContext() ) - ); - return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS ); - } - - if ( jaxbPersistentAttribute instanceof JaxbBasicImpl jaxbBasic ) { - final MutableClassDetails classDetails = xmlDocumentContext.resolveJavaType( jaxbBasic.getTarget() ); - return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS ); - } - - if ( jaxbPersistentAttribute instanceof JaxbEmbeddedImpl jaxbEmbedded ) { - final String target = jaxbEmbedded.getTarget(); - if ( StringHelper.isEmpty( target ) ) { - return null; - } - final ClassDetails classDetails = classDetailsRegistry.resolveClassDetails( - target, - (name) -> new DynamicClassDetails( target, xmlDocumentContext.getModelBuildingContext() ) - ); - return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS ); - } - - if ( jaxbPersistentAttribute instanceof JaxbOneToOneImpl jaxbOneToOne ) { - final String target = jaxbOneToOne.getTargetEntity(); - if ( StringHelper.isEmpty( target ) ) { - return null; - } - final ClassDetails classDetails = classDetailsRegistry.resolveClassDetails( - target, - (name) -> new DynamicClassDetails( - target, - null, - false, - null, - null, - xmlDocumentContext.getModelBuildingContext() - ) - ); - return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS ); - } - - if ( jaxbPersistentAttribute instanceof JaxbAnyMappingImpl ) { - final ClassDetails classDetails = classDetailsRegistry.getClassDetails( Object.class.getName() ); - return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS ); - } - - if ( jaxbPersistentAttribute instanceof JaxbPluralAttribute jaxbPluralAttribute ) { - final LimitedCollectionClassification classification = nullif( jaxbPluralAttribute.getClassification(), LimitedCollectionClassification.BAG ); - final ClassDetails collectionClassDetails; - - collectionClassDetails = switch ( classification ) { - case BAG -> classDetailsRegistry.resolveClassDetails( Collection.class.getName() ); - case LIST -> classDetailsRegistry.resolveClassDetails( List.class.getName() ); - case SET -> classDetailsRegistry.resolveClassDetails( Set.class.getName() ); - case MAP -> classDetailsRegistry.resolveClassDetails( Map.class.getName() ); - }; - - return new ClassTypeDetailsImpl( collectionClassDetails, TypeDetails.Kind.CLASS ); - } - - throw new UnsupportedOperationException( "Resolution of dynamic attribute Java type not yet implemented for " + jaxbPersistentAttribute ); + final MutableClassDetails classDetails = xmlDocumentContext.resolveDynamicJavaType( jaxbPersistentAttribute ); + return new ClassTypeDetailsImpl( classDetails, TypeDetails.Kind.CLASS ); } private static void adjustDynamicTypeMember( diff --git a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlDocumentContextImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlDocumentContextImpl.java index ba04ac1be1..f482b43445 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlDocumentContextImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlDocumentContextImpl.java @@ -9,6 +9,7 @@ package org.hibernate.boot.models.xml.internal; import org.hibernate.boot.models.xml.spi.PersistenceUnitMetadata; import org.hibernate.boot.models.xml.spi.XmlDocument; import org.hibernate.boot.models.xml.spi.XmlDocumentContext; +import org.hibernate.boot.spi.BootstrapContext; import org.hibernate.models.spi.SourceModelBuildingContext; /** @@ -18,14 +19,17 @@ public class XmlDocumentContextImpl implements XmlDocumentContext { private final XmlDocument xmlDocument; private final PersistenceUnitMetadata persistenceUnitMetadata; private final SourceModelBuildingContext modelBuildingContext; + private final BootstrapContext bootstrapContext; public XmlDocumentContextImpl( XmlDocument xmlDocument, PersistenceUnitMetadata persistenceUnitMetadata, - SourceModelBuildingContext modelBuildingContext) { + SourceModelBuildingContext modelBuildingContext, + BootstrapContext bootstrapContext) { this.xmlDocument = xmlDocument; this.persistenceUnitMetadata = persistenceUnitMetadata; this.modelBuildingContext = modelBuildingContext; + this.bootstrapContext = bootstrapContext; } @Override @@ -42,4 +46,9 @@ public class XmlDocumentContextImpl implements XmlDocumentContext { public SourceModelBuildingContext getModelBuildingContext() { return modelBuildingContext; } + + @Override + public BootstrapContext getBootstrapContext() { + return bootstrapContext; + } } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlDocumentContext.java b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlDocumentContext.java index 56fe56d7ef..bc172bc709 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlDocumentContext.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlDocumentContext.java @@ -6,9 +6,34 @@ */ package org.hibernate.boot.models.xml.spi; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.hibernate.HibernateException; +import org.hibernate.boot.internal.LimitedCollectionClassification; +import org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping; +import org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute; +import org.hibernate.boot.jaxb.mapping.spi.JaxbBasicMapping; +import org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddedMapping; +import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistentAttribute; +import org.hibernate.boot.jaxb.mapping.spi.JaxbPluralAttribute; +import org.hibernate.boot.jaxb.mapping.spi.JaxbUserTypeImpl; import org.hibernate.boot.models.xml.internal.XmlAnnotationHelper; +import org.hibernate.boot.spi.BootstrapContext; +import org.hibernate.models.internal.dynamic.DynamicClassDetails; +import org.hibernate.models.spi.ClassDetails; import org.hibernate.models.spi.MutableClassDetails; import org.hibernate.models.spi.SourceModelBuildingContext; +import org.hibernate.type.descriptor.java.JavaType; +import org.hibernate.type.descriptor.jdbc.JdbcType; +import org.hibernate.usertype.UserType; + +import org.checkerframework.checker.nullness.qual.NonNull; + +import static org.hibernate.internal.util.NullnessHelper.nullif; +import static org.hibernate.internal.util.StringHelper.isNotEmpty; /** * Context for a specific XML mapping file @@ -27,14 +52,148 @@ public interface XmlDocumentContext { PersistenceUnitMetadata getPersistenceUnitMetadata(); /** - * Access to the containing context + * Access to the containing SourceModelBuildingContext */ SourceModelBuildingContext getModelBuildingContext(); + /** + * Access to the containing BootstrapContext + */ + BootstrapContext getBootstrapContext(); + /** * Resolve a ClassDetails by name, accounting for XML-defined package name if one. */ default MutableClassDetails resolveJavaType(String name) { - return (MutableClassDetails) XmlAnnotationHelper.resolveJavaType( name, this ); + try { + return (MutableClassDetails) XmlAnnotationHelper.resolveJavaType( name, this ); + } + catch (Exception e) { + final HibernateException hibernateException = new HibernateException( "Unable to resolve Java type " + name ); + hibernateException.addSuppressed( e ); + throw hibernateException; + } + } + + /** + * Resolve a ClassDetails by name, accounting for XML-defined package name if one. + */ + default MutableClassDetails resolveDynamicJavaType(JaxbPersistentAttribute jaxbPersistentAttribute) { + if ( jaxbPersistentAttribute instanceof JaxbBasicMapping jaxbBasicMapping ) { + // , , + + // explicit + final String target = jaxbBasicMapping.getTarget(); + if ( isNotEmpty( target ) ) { + return (MutableClassDetails) XmlAnnotationHelper.resolveJavaType( target, this ); + } + + // UserType + final JaxbUserTypeImpl userTypeNode = jaxbBasicMapping.getType(); + if ( userTypeNode != null ) { + final String userTypeImplName = userTypeNode.getValue(); + if ( isNotEmpty( userTypeImplName ) ) { + final ClassDetails userTypeImplDetails = XmlAnnotationHelper.resolveJavaType( userTypeImplName, this ); + // safe to convert to class, though unfortunate to have to instantiate it... + final UserType userType = createInstance( userTypeImplDetails ); + final Class modelClass = userType.returnedClass(); + return (MutableClassDetails) getModelBuildingContext().getClassDetailsRegistry().getClassDetails( modelClass.getName() ); + } + } + + // JavaType + final String javaTypeImplName = jaxbBasicMapping.getJavaType(); + if ( isNotEmpty( javaTypeImplName ) ) { + final ClassDetails javaTypeImplDetails = XmlAnnotationHelper.resolveJavaType( javaTypeImplName, this ); + // safe to convert to class, though unfortunate to have to instantiate it... + final JavaType javaType = createInstance( javaTypeImplDetails ); + final Class modelClass = javaType.getJavaTypeClass(); + return (MutableClassDetails) getModelBuildingContext().getClassDetailsRegistry().getClassDetails( modelClass.getName() ); + } + + // JdbcType + final String jdbcTypeImplName = jaxbBasicMapping.getJdbcType(); + final Integer jdbcTypeCode = jaxbBasicMapping.getJdbcTypeCode(); + final JdbcType jdbcType; + if ( isNotEmpty( jdbcTypeImplName ) ) { + final ClassDetails jdbcTypeImplDetails = XmlAnnotationHelper.resolveJavaType( javaTypeImplName, this ); + jdbcType = createInstance( jdbcTypeImplDetails ); + } + else if ( jdbcTypeCode != null ) { + jdbcType = getBootstrapContext().getTypeConfiguration().getJdbcTypeRegistry().getDescriptor( jdbcTypeCode ); + } + else { + jdbcType = null; + } + if ( jdbcType != null ) { + final JavaType javaType = jdbcType.getJdbcRecommendedJavaTypeMapping( 0, 0, getBootstrapContext().getTypeConfiguration() ); + final Class modelClass = javaType.getJavaTypeClass(); + return (MutableClassDetails) getModelBuildingContext().getClassDetailsRegistry().getClassDetails( modelClass.getName() ); + } + + // fall through to exception + } + + if ( jaxbPersistentAttribute instanceof JaxbEmbeddedMapping jaxbEmbeddedMapping ) { + // , + final String target = jaxbEmbeddedMapping.getTarget(); + if ( isNotEmpty( target ) ) { + return (MutableClassDetails) getModelBuildingContext().getClassDetailsRegistry().resolveClassDetails( + target, + (name) -> new DynamicClassDetails( target, getModelBuildingContext() ) + ); + } + // fall through to exception + } + + if ( jaxbPersistentAttribute instanceof JaxbAssociationAttribute jaxbAssociationAttribute ) { + final String target = jaxbAssociationAttribute.getTargetEntity(); + if ( isNotEmpty( target ) ) { + return (MutableClassDetails) getModelBuildingContext().getClassDetailsRegistry().resolveClassDetails( + target, + (name) -> new DynamicClassDetails( + target, + null, + false, + null, + null, + getModelBuildingContext() + ) + ); + } + // fall through to exception + } + + if ( jaxbPersistentAttribute instanceof JaxbAnyMapping ) { + // todo : this is problematic because we'd really want Object, but the hibernate-models + // definition of ClassDetails(Object) is immutable. Probably the best option here + // is to create a new (unregistered) DynamicClassDetails for each + throw new UnsupportedOperationException( "Not yet implemented" ); + } + + if ( jaxbPersistentAttribute instanceof JaxbPluralAttribute jaxbPluralAttribute ) { + final LimitedCollectionClassification classification = nullif( jaxbPluralAttribute.getClassification(), LimitedCollectionClassification.BAG ); + return switch ( classification ) { + case BAG -> resolveJavaType( Collection.class.getName() ); + case LIST -> resolveJavaType( List.class.getName() ); + case SET -> resolveJavaType( Set.class.getName() ); + case MAP -> resolveJavaType( Map.class.getName() ); + }; + } + + // todo : would be nice to have at least the XML origin (file name, etc) for the exception. + // the "context" (class where this happens) would be even more nicerer + throw new HibernateException( "Could not determine target type for dynamic attribute - " + jaxbPersistentAttribute.getName() ); + } + + @NonNull + private T createInstance(ClassDetails classDetails) { + try { + //noinspection unchecked + return (T) classDetails.toJavaClass().getConstructor().newInstance(); + } + catch (Exception e) { + throw new HibernateException( "Unable to create instance from incoming ClassDetails - " + classDetails ); + } } } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlProcessor.java b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlProcessor.java index dbf74b3637..e4b5d64896 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlProcessor.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/models/xml/spi/XmlProcessor.java @@ -11,6 +11,7 @@ import org.hibernate.boot.models.xml.internal.ManagedTypeProcessor; import org.hibernate.boot.models.xml.internal.XmlDocumentContextImpl; import org.hibernate.boot.models.xml.internal.XmlDocumentImpl; import org.hibernate.boot.models.xml.internal.XmlProcessingResultImpl; +import org.hibernate.boot.spi.BootstrapContext; import org.hibernate.models.spi.SourceModelBuildingContext; /** @@ -23,7 +24,8 @@ public class XmlProcessor { public static XmlProcessingResult processXml( XmlPreProcessingResult xmlPreProcessingResult, DomainModelCategorizationCollector modelCategorizationCollector, - SourceModelBuildingContext sourceModelBuildingContext) { + SourceModelBuildingContext sourceModelBuildingContext, + BootstrapContext bootstrapContext) { final boolean xmlMappingsGloballyComplete = xmlPreProcessingResult.getPersistenceUnitMetadata().areXmlMappingsComplete(); final XmlProcessingResultImpl xmlOverlay = new XmlProcessingResultImpl(); @@ -36,7 +38,8 @@ public class XmlProcessor { final XmlDocumentContext xmlDocumentContext = new XmlDocumentContextImpl( xmlDocument, xmlPreProcessingResult.getPersistenceUnitMetadata(), - sourceModelBuildingContext + sourceModelBuildingContext, + bootstrapContext ); jaxbRoot.getEmbeddables().forEach( (jaxbEmbeddable) -> { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/DynamicModelTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/DynamicModelTests.java index 096a153fa6..6d15d130fc 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/DynamicModelTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/DynamicModelTests.java @@ -77,7 +77,7 @@ public class DynamicModelTests { assertThat( idField.getType().determineRawClass().getClassName() ).isEqualTo( Integer.class.getName() ); final FieldDetails nameField = rootEntity.getClassDetails().findFieldByName( "name" ); - assertThat( nameField.getType().determineRawClass().getClassName() ).isEqualTo( Object.class.getName() ); + assertThat( nameField.getType().determineRawClass().getClassName() ).isEqualTo( String.class.getName() ); assertThat( nameField.getAnnotationUsage( JavaType.class ) ).isNotNull(); final FieldDetails qtyField = rootEntity.getClassDetails().findFieldByName( "quantity" ); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/RowIdTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/RowIdTest.java index 1d5dc1fd17..bace0b4b47 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/RowIdTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/boot/models/xml/dynamic/RowIdTest.java @@ -57,7 +57,7 @@ public class RowIdTest { assertThat( rowIdAnnotationUsage ).isNotNull(); final String value = rowIdAnnotationUsage.getString( "value" ); if ( entityName.equals( "EntityWithRowIdNoValue" ) ) { - assertThat( value ).isNull(); + assertThat( value ).isEmpty(); } else { assertThat( value ).isEqualTo( "ROW_ID" ); diff --git a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-named-entity-graph.xml b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-named-entity-graph.xml index e6f703a3f9..f67ac05419 100644 --- a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-named-entity-graph.xml +++ b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-named-entity-graph.xml @@ -20,17 +20,26 @@ - - - - + + integer + + + string + + + string + + + + + + + + integer + + + string + - - - - - - - \ No newline at end of file diff --git a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-rowid.xml b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-rowid.xml index 6d27580451..4f74261d0d 100644 --- a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-rowid.xml +++ b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-rowid.xml @@ -6,7 +6,7 @@ --> + version="3.2"> diff --git a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-semi-simple.xml b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-semi-simple.xml index 399e49d127..55d2bb2a45 100644 --- a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-semi-simple.xml +++ b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-semi-simple.xml @@ -6,7 +6,7 @@ --> + version="3.2"> diff --git a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-simple.xml b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-simple.xml index b8261f9fb3..2292cb2991 100644 --- a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-simple.xml +++ b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-simple.xml @@ -6,7 +6,7 @@ --> + version="3.2"> diff --git a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-tenantid.xml b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-tenantid.xml index e95b4a6d47..4bc6914667 100644 --- a/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-tenantid.xml +++ b/hibernate-core/src/test/resources/mappings/models/dynamic/dynamic-tenantid.xml @@ -8,7 +8,9 @@ version="3.2"> - + + Long + @@ -17,10 +19,13 @@ + String - + + Integer +