HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models, XSD and JAXB HHH-16114 - Improve boot metamodel binding HHH-15996 - Develop an abstraction for Annotation in annotation processing HHH-16012 - Develop an abstraction for domain model Class refs HHH-15997 - Support for dynamic models in orm.xml HHH-15698 - Support for entity-name in mapping.xsd

This commit is contained in:
Andrea Boriero 2024-03-19 15:23:01 +01:00 committed by Steve Ebersole
parent 872b834047
commit 286f641f98
4 changed files with 36 additions and 27 deletions

View File

@ -2181,6 +2181,7 @@ public class JPAXMLOverriddenAnnotationReader implements AnnotationReader {
AnnotationDescriptor annSubgraphNode = new AnnotationDescriptor( NamedSubgraph.class );
copyAttribute( annSubgraphNode, "name", subgraphNode.getName(), true );
String clazzName = subgraphNode.getClazz();
if ( StringHelper.isNotEmpty( clazzName ) ) {
final Class<?> clazz;
try {
clazz = classLoaderAccess.classForName(
@ -2191,6 +2192,7 @@ public class JPAXMLOverriddenAnnotationReader implements AnnotationReader {
throw new AnnotationException( "Unable to find entity-class: " + clazzName, e );
}
annSubgraphNode.setValue( "type", clazz );
}
bindNamedAttributeNodes( subgraphNode.getNamedAttributeNode(), annSubgraphNode );
annSubgraphNodes.add( AnnotationFactory.create( annSubgraphNode ) );
}
@ -2233,6 +2235,7 @@ public class JPAXMLOverriddenAnnotationReader implements AnnotationReader {
parameterDescriptor.setValue( "mode", modeValue );
}
String clazzName = parameterElement.getClazz();
if ( StringHelper.isNotEmpty( clazzName ) ) {
Class<?> clazz;
try {
clazz = classLoaderAccess.classForName(
@ -2243,6 +2246,7 @@ public class JPAXMLOverriddenAnnotationReader implements AnnotationReader {
throw new AnnotationException( "Unable to find entity-class: " + clazzName, e );
}
parameterDescriptor.setValue( "type", clazz );
}
storedProcedureParameters.add( AnnotationFactory.create( parameterDescriptor ) );
}

View File

@ -843,6 +843,8 @@ public class ManagedTypeProcessor {
.getClassDetailsRegistry()
.resolveClassDetails( className );
XmlProcessingHelper.getOrMakeAnnotation( Embeddable.class, classDetails, xmlDocumentContext );
AttributeProcessor.processAttributes(
jaxbEmbeddable.getAttributes(),
classDetails,

View File

@ -50,14 +50,17 @@ public class ElementCollectionAttributeProcessing {
jaxbElementCollection.getFetch(),
elementCollectionAnn
);
final String targetClass = jaxbElementCollection.getTargetClass();
if ( targetClass != null ) {
XmlProcessingHelper.applyAttributeIfSpecified(
"targetClass",
XmlAnnotationHelper.resolveJavaType(
jaxbElementCollection.getTargetClass(),
targetClass,
xmlDocumentContext.getModelBuildingContext()
).determineRawClass(),
elementCollectionAnn
);
}
CommonAttributeProcessing.applyAttributeBasics( jaxbElementCollection, memberDetails, elementCollectionAnn, accessType, xmlDocumentContext );

View File

@ -70,7 +70,7 @@ dependencyResolutionManagement {
def byteBuddyVersion = version "byteBuddy", "1.14.18"
def classmateVersion = version "classmate", "1.5.1"
def geolatteVersion = version "geolatte", "1.9.1"
def hibernateModelsVersion = version "hibernateModels", "0.7.1"
def hibernateModelsVersion = version "hibernateModels", "0.7.2"
def jandexVersion = version "jandex", "3.2.0"
def hcannVersion = version "hcann", "7.0.1.Final"
def jacksonVersion = version "jackson", "2.17.0"