HHH-16709 Use embeddable type's compare for embedded attribute mappings
This commit is contained in:
parent
54382e09ea
commit
3c62691dc4
|
@ -13,18 +13,14 @@ import java.util.function.Consumer;
|
|||
|
||||
import org.hibernate.engine.FetchStyle;
|
||||
import org.hibernate.engine.FetchTiming;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.internal.util.collections.CollectionHelper;
|
||||
import org.hibernate.metamodel.mapping.AttributeMapping;
|
||||
import org.hibernate.metamodel.mapping.AttributeMetadata;
|
||||
import org.hibernate.metamodel.mapping.EmbeddableMappingType;
|
||||
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
|
||||
import org.hibernate.metamodel.mapping.EntityMappingType;
|
||||
import org.hibernate.metamodel.mapping.JdbcMapping;
|
||||
import org.hibernate.metamodel.mapping.ManagedMappingType;
|
||||
import org.hibernate.metamodel.mapping.ModelPart;
|
||||
import org.hibernate.metamodel.mapping.PropertyBasedMapping;
|
||||
import org.hibernate.metamodel.mapping.SelectableConsumer;
|
||||
import org.hibernate.metamodel.mapping.SelectableMapping;
|
||||
import org.hibernate.metamodel.mapping.SelectableMappings;
|
||||
import org.hibernate.metamodel.model.domain.NavigableRole;
|
||||
|
@ -407,4 +403,9 @@ public class EmbeddedAttributeMapping
|
|||
}
|
||||
return producer.containsTableReference( tableExpression );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(Object value1, Object value2) {
|
||||
return embeddableMappingType.compare( value1, value2 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,4 +118,8 @@ public class EmbeddedIdentifierMappingImpl
|
|||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(Object value1, Object value2) {
|
||||
return getEmbeddableTypeDescriptor().compare( value1, value2 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue