rebase fixups : main -> 7.0
This commit is contained in:
parent
16088f7f11
commit
6708cd5cf5
|
@ -271,9 +271,13 @@ public class ClassPropertyHolder extends AbstractPropertyHolder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addPropertyToMappedSuperclass(Property prop, MemberDetails memberDetails, ClassDetails declaringClass) {
|
public static void addPropertyToMappedSuperclass(
|
||||||
final MappedSuperclass superclass = getContext().getMetadataCollector().getMappedSuperclass( declaringClass.toJavaClass() );
|
Property prop,
|
||||||
prepareActualProperty( prop, memberDetails, true, getContext(), superclass::addDeclaredProperty );
|
MemberDetails memberDetails,
|
||||||
|
ClassDetails declaringClass,
|
||||||
|
MetadataBuildingContext context) {
|
||||||
|
final MappedSuperclass superclass = context.getMetadataCollector().getMappedSuperclass( declaringClass.toJavaClass() );
|
||||||
|
prepareActualProperty( prop, memberDetails, true, context, superclass::addDeclaredProperty );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepareActualProperty(
|
static void prepareActualProperty(
|
||||||
|
|
|
@ -32,8 +32,6 @@ import jakarta.persistence.JoinTable;
|
||||||
|
|
||||||
import static org.hibernate.boot.model.internal.ClassPropertyHolder.addPropertyToMappedSuperclass;
|
import static org.hibernate.boot.model.internal.ClassPropertyHolder.addPropertyToMappedSuperclass;
|
||||||
import static org.hibernate.boot.model.internal.ClassPropertyHolder.handleGenericComponentProperty;
|
import static org.hibernate.boot.model.internal.ClassPropertyHolder.handleGenericComponentProperty;
|
||||||
import static org.hibernate.boot.model.internal.HCANNHelper.hasAnnotation;
|
|
||||||
import static org.hibernate.internal.util.NullnessUtil.castNonNull;
|
|
||||||
import static org.hibernate.internal.util.StringHelper.isEmpty;
|
import static org.hibernate.internal.util.StringHelper.isEmpty;
|
||||||
import static org.hibernate.internal.util.StringHelper.qualifyConditionally;
|
import static org.hibernate.internal.util.StringHelper.qualifyConditionally;
|
||||||
import static org.hibernate.spi.NavigablePath.IDENTIFIER_MAPPER_PROPERTY;
|
import static org.hibernate.spi.NavigablePath.IDENTIFIER_MAPPER_PROPERTY;
|
||||||
|
@ -70,7 +68,7 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder {
|
||||||
private final Component component;
|
private final Component component;
|
||||||
private final boolean isOrWithinEmbeddedId;
|
private final boolean isOrWithinEmbeddedId;
|
||||||
private final boolean isWithinElementCollection;
|
private final boolean isWithinElementCollection;
|
||||||
private final Map<XClass, InheritanceState> inheritanceStatePerClass;
|
private final Map<ClassDetails, InheritanceState> inheritanceStatePerClass;
|
||||||
|
|
||||||
private final String embeddedAttributeName;
|
private final String embeddedAttributeName;
|
||||||
private final Map<String,AttributeConversionInfo> attributeConversionInfoMap;
|
private final Map<String,AttributeConversionInfo> attributeConversionInfoMap;
|
||||||
|
@ -81,7 +79,7 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder {
|
||||||
PropertyData inferredData,
|
PropertyData inferredData,
|
||||||
PropertyHolder parent,
|
PropertyHolder parent,
|
||||||
MetadataBuildingContext context,
|
MetadataBuildingContext context,
|
||||||
Map<XClass, InheritanceState> inheritanceStatePerClass) {
|
Map<ClassDetails, InheritanceState> inheritanceStatePerClass) {
|
||||||
super( path, parent, inferredData.getPropertyType().determineRawClass(), context );
|
super( path, parent, inferredData.getPropertyType().determineRawClass(), context );
|
||||||
final MemberDetails embeddedMemberDetails = inferredData.getAttributeMember();
|
final MemberDetails embeddedMemberDetails = inferredData.getAttributeMember();
|
||||||
setCurrentProperty( embeddedMemberDetails );
|
setCurrentProperty( embeddedMemberDetails );
|
||||||
|
@ -292,11 +290,11 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addProperty(Property prop, MemberDetails attributeMemberDetails, ClassDetails declaringClass) {
|
public void addProperty(Property prop, MemberDetails attributeMemberDetails, ClassDetails declaringClass) {
|
||||||
handleGenericComponentProperty( prop, getContext() );
|
handleGenericComponentProperty( prop, attributeMemberDetails, getContext() );
|
||||||
if ( declaringClass != null ) {
|
if ( declaringClass != null ) {
|
||||||
final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass );
|
final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass );
|
||||||
if ( inheritanceState != null && inheritanceState.isEmbeddableSuperclass() ) {
|
if ( inheritanceState != null && inheritanceState.isEmbeddableSuperclass() ) {
|
||||||
addPropertyToMappedSuperclass( prop, declaringClass, getContext() );
|
addPropertyToMappedSuperclass( prop, attributeMemberDetails, declaringClass, getContext() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
component.addProperty( prop, declaringClass );
|
component.addProperty( prop, declaringClass );
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.hibernate.boot.spi.PropertyData;
|
||||||
import org.hibernate.mapping.Component;
|
import org.hibernate.mapping.Component;
|
||||||
import org.hibernate.mapping.PersistentClass;
|
import org.hibernate.mapping.PersistentClass;
|
||||||
import org.hibernate.mapping.Table;
|
import org.hibernate.mapping.Table;
|
||||||
import org.hibernate.models.spi.AnnotationUsage;
|
|
||||||
import org.hibernate.models.spi.ClassDetails;
|
import org.hibernate.models.spi.ClassDetails;
|
||||||
import org.hibernate.models.spi.FieldDetails;
|
import org.hibernate.models.spi.FieldDetails;
|
||||||
import org.hibernate.models.spi.MethodDetails;
|
import org.hibernate.models.spi.MethodDetails;
|
||||||
|
|
|
@ -55,7 +55,7 @@ public final class PropertyHolderBuilder {
|
||||||
PropertyData inferredData,
|
PropertyData inferredData,
|
||||||
PropertyHolder parent,
|
PropertyHolder parent,
|
||||||
MetadataBuildingContext context,
|
MetadataBuildingContext context,
|
||||||
Map<XClass, InheritanceState> inheritanceStatePerClass) {
|
Map<ClassDetails, InheritanceState> inheritanceStatePerClass) {
|
||||||
return new ComponentPropertyHolder( component, path, inferredData, parent, context, inheritanceStatePerClass );
|
return new ComponentPropertyHolder( component, path, inferredData, parent, context, inheritanceStatePerClass );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,8 +280,8 @@ abstract class AbstractSqmSelectionQuery<R> extends AbstractSelectionQuery<R> {
|
||||||
return buildConcreteQueryPlan( sqmStatement, null, null, options );
|
return buildConcreteQueryPlan( sqmStatement, null, null, options );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void applyOptions(NamedSqmQueryMemento memento) {
|
protected void applyOptions(NamedSqmQueryMemento<?> memento) {
|
||||||
applyOptions( (NamedQueryMemento) memento );
|
applyOptions( (NamedQueryMemento<?>) memento );
|
||||||
|
|
||||||
if ( memento.getFirstResult() != null ) {
|
if ( memento.getFirstResult() != null ) {
|
||||||
setFirstResult( memento.getFirstResult() );
|
setFirstResult( memento.getFirstResult() );
|
||||||
|
|
Loading…
Reference in New Issue