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) {
|
||||
final MappedSuperclass superclass = getContext().getMetadataCollector().getMappedSuperclass( declaringClass.toJavaClass() );
|
||||
prepareActualProperty( prop, memberDetails, true, getContext(), superclass::addDeclaredProperty );
|
||||
public static void addPropertyToMappedSuperclass(
|
||||
Property prop,
|
||||
MemberDetails memberDetails,
|
||||
ClassDetails declaringClass,
|
||||
MetadataBuildingContext context) {
|
||||
final MappedSuperclass superclass = context.getMetadataCollector().getMappedSuperclass( declaringClass.toJavaClass() );
|
||||
prepareActualProperty( prop, memberDetails, true, context, superclass::addDeclaredProperty );
|
||||
}
|
||||
|
||||
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.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.qualifyConditionally;
|
||||
import static org.hibernate.spi.NavigablePath.IDENTIFIER_MAPPER_PROPERTY;
|
||||
|
@ -70,7 +68,7 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder {
|
|||
private final Component component;
|
||||
private final boolean isOrWithinEmbeddedId;
|
||||
private final boolean isWithinElementCollection;
|
||||
private final Map<XClass, InheritanceState> inheritanceStatePerClass;
|
||||
private final Map<ClassDetails, InheritanceState> inheritanceStatePerClass;
|
||||
|
||||
private final String embeddedAttributeName;
|
||||
private final Map<String,AttributeConversionInfo> attributeConversionInfoMap;
|
||||
|
@ -81,7 +79,7 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder {
|
|||
PropertyData inferredData,
|
||||
PropertyHolder parent,
|
||||
MetadataBuildingContext context,
|
||||
Map<XClass, InheritanceState> inheritanceStatePerClass) {
|
||||
Map<ClassDetails, InheritanceState> inheritanceStatePerClass) {
|
||||
super( path, parent, inferredData.getPropertyType().determineRawClass(), context );
|
||||
final MemberDetails embeddedMemberDetails = inferredData.getAttributeMember();
|
||||
setCurrentProperty( embeddedMemberDetails );
|
||||
|
@ -292,11 +290,11 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder {
|
|||
|
||||
@Override
|
||||
public void addProperty(Property prop, MemberDetails attributeMemberDetails, ClassDetails declaringClass) {
|
||||
handleGenericComponentProperty( prop, getContext() );
|
||||
handleGenericComponentProperty( prop, attributeMemberDetails, getContext() );
|
||||
if ( declaringClass != null ) {
|
||||
final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass );
|
||||
if ( inheritanceState != null && inheritanceState.isEmbeddableSuperclass() ) {
|
||||
addPropertyToMappedSuperclass( prop, declaringClass, getContext() );
|
||||
addPropertyToMappedSuperclass( prop, attributeMemberDetails, declaringClass, getContext() );
|
||||
}
|
||||
}
|
||||
component.addProperty( prop, declaringClass );
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.hibernate.boot.spi.PropertyData;
|
|||
import org.hibernate.mapping.Component;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
import org.hibernate.mapping.Table;
|
||||
import org.hibernate.models.spi.AnnotationUsage;
|
||||
import org.hibernate.models.spi.ClassDetails;
|
||||
import org.hibernate.models.spi.FieldDetails;
|
||||
import org.hibernate.models.spi.MethodDetails;
|
||||
|
|
|
@ -55,7 +55,7 @@ public final class PropertyHolderBuilder {
|
|||
PropertyData inferredData,
|
||||
PropertyHolder parent,
|
||||
MetadataBuildingContext context,
|
||||
Map<XClass, InheritanceState> inheritanceStatePerClass) {
|
||||
Map<ClassDetails, InheritanceState> 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 );
|
||||
}
|
||||
|
||||
protected void applyOptions(NamedSqmQueryMemento memento) {
|
||||
applyOptions( (NamedQueryMemento) memento );
|
||||
protected void applyOptions(NamedSqmQueryMemento<?> memento) {
|
||||
applyOptions( (NamedQueryMemento<?>) memento );
|
||||
|
||||
if ( memento.getFirstResult() != null ) {
|
||||
setFirstResult( memento.getFirstResult() );
|
||||
|
|
Loading…
Reference in New Issue