Merge remote-tracking branch 'upstream/main' into wip/6.0_merge
This commit is contained in:
commit
5d62eac4b9
|
@ -97,7 +97,7 @@ in <<basic-custom-type>>.
|
|||
[cols="<.^,<.^,<.^,<.^",options="header",]
|
||||
|=================================================================================================
|
||||
|Hibernate type (org.hibernate.spatial package) |JDBC type |Java type |BasicTypeRegistry key(s)
|
||||
|JTSGeometryType |depends on the dialect | com.vividsolutions.jts.geom.Geometry |jts_geometry, and the class names of Geometry and its subclasses
|
||||
|JTSGeometryType |depends on the dialect | org.locationtech.jts.geom.Geometry |jts_geometry, and the class names of Geometry and its subclasses
|
||||
|GeolatteGeometryType |depends on the dialect | org.geolatte.geom.Geometry |geolatte_geometry, and the class names of Geometry and its subclasses
|
||||
|=================================================================================================
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ import static org.hibernate.cfg.AvailableSettings.VALIDATE_QUERY_PARAMETERS;
|
|||
import static org.hibernate.cfg.AvailableSettings.WRAP_RESULT_SETS;
|
||||
import static org.hibernate.engine.config.spi.StandardConverters.BOOLEAN;
|
||||
import static org.hibernate.internal.CoreLogging.messageLogger;
|
||||
import static org.hibernate.internal.log.DeprecationLogger.DEPRECATION_LOGGER;
|
||||
|
||||
/**
|
||||
* In-flight state of {@link SessionFactoryOptions}
|
||||
|
@ -290,7 +291,7 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
|
|||
() -> {
|
||||
final Object value = configurationSettings.get( AvailableSettings.CDI_BEAN_MANAGER );
|
||||
if ( value != null ) {
|
||||
DeprecationLogger.DEPRECATION_LOGGER.deprecatedSetting(
|
||||
DEPRECATION_LOGGER.deprecatedSetting(
|
||||
AvailableSettings.CDI_BEAN_MANAGER,
|
||||
AvailableSettings.JAKARTA_CDI_BEAN_MANAGER
|
||||
);
|
||||
|
@ -692,7 +693,7 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
|
|||
// try the legacy (deprecated) JPA name
|
||||
setting = configurationSettings.get( org.hibernate.cfg.AvailableSettings.INTERCEPTOR );
|
||||
if ( setting != null ) {
|
||||
DeprecationLogger.DEPRECATION_LOGGER.deprecatedSetting(
|
||||
DEPRECATION_LOGGER.deprecatedSetting(
|
||||
org.hibernate.cfg.AvailableSettings.INTERCEPTOR,
|
||||
INTERCEPTOR
|
||||
);
|
||||
|
@ -778,7 +779,7 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
|
|||
ConnectionReleaseMode specifiedReleaseMode,
|
||||
Map configurationSettings,
|
||||
TransactionCoordinatorBuilder transactionCoordinatorBuilder) {
|
||||
DeprecationLogger.DEPRECATION_LOGGER.logUseOfDeprecatedConnectionHandlingSettings();
|
||||
DEPRECATION_LOGGER.logUseOfDeprecatedConnectionHandlingSettings();
|
||||
|
||||
final ConnectionAcquisitionMode effectiveAcquisitionMode = specifiedAcquisitionMode == null
|
||||
? ConnectionAcquisitionMode.AS_NEEDED
|
||||
|
|
|
@ -114,135 +114,6 @@ public class BinderHelper {
|
|||
return clone;
|
||||
}
|
||||
|
||||
// This is sooooooooo close in terms of not generating a synthetic property if we do not have to (where property ref
|
||||
// refers to a single property). The sticking point is cases where the `referencedPropertyName` come from subclasses
|
||||
// or secondary tables. Part of the problem is in PersistentClass itself during attempts to resolve the referenced
|
||||
// property; currently it only considers non-subclass and non-joined properties. Part of the problem is in terms
|
||||
// of SQL generation.
|
||||
// public static void createSyntheticPropertyReference(
|
||||
// Ejb3JoinColumn[] columns,
|
||||
// PersistentClass ownerEntity,
|
||||
// PersistentClass associatedEntity,
|
||||
// Value value,
|
||||
// boolean inverse,
|
||||
// Mappings mappings) {
|
||||
// //associated entity only used for more precise exception, yuk!
|
||||
// if ( columns[0].isImplicit() || StringHelper.isNotEmpty( columns[0].getMappedBy() ) ) return;
|
||||
// int fkEnum = Ejb3JoinColumn.checkReferencedColumnsType( columns, ownerEntity, mappings );
|
||||
// PersistentClass associatedClass = columns[0].getPropertyHolder() != null ?
|
||||
// columns[0].getPropertyHolder().getPersistentClass() :
|
||||
// null;
|
||||
// if ( Ejb3JoinColumn.NON_PK_REFERENCE == fkEnum ) {
|
||||
// //find properties associated to a certain column
|
||||
// Object columnOwner = findColumnOwner( ownerEntity, columns[0].getReferencedColumn(), mappings );
|
||||
// List<Property> properties = findPropertiesByColumns( columnOwner, columns, mappings );
|
||||
//
|
||||
// if ( properties == null ) {
|
||||
// //TODO use a ToOne type doing a second select
|
||||
// StringBuilder columnsList = new StringBuilder();
|
||||
// columnsList.append( "referencedColumnNames(" );
|
||||
// for (Ejb3JoinColumn column : columns) {
|
||||
// columnsList.append( column.getReferencedColumn() ).append( ", " );
|
||||
// }
|
||||
// columnsList.setLength( columnsList.length() - 2 );
|
||||
// columnsList.append( ") " );
|
||||
//
|
||||
// if ( associatedEntity != null ) {
|
||||
// //overidden destination
|
||||
// columnsList.append( "of " )
|
||||
// .append( associatedEntity.getEntityName() )
|
||||
// .append( "." )
|
||||
// .append( columns[0].getPropertyName() )
|
||||
// .append( " " );
|
||||
// }
|
||||
// else {
|
||||
// if ( columns[0].getPropertyHolder() != null ) {
|
||||
// columnsList.append( "of " )
|
||||
// .append( columns[0].getPropertyHolder().getEntityName() )
|
||||
// .append( "." )
|
||||
// .append( columns[0].getPropertyName() )
|
||||
// .append( " " );
|
||||
// }
|
||||
// }
|
||||
// columnsList.append( "referencing " )
|
||||
// .append( ownerEntity.getEntityName() )
|
||||
// .append( " not mapped to a single property" );
|
||||
// throw new AnnotationException( columnsList.toString() );
|
||||
// }
|
||||
//
|
||||
// final String referencedPropertyName;
|
||||
//
|
||||
// if ( properties.size() == 1 ) {
|
||||
// referencedPropertyName = properties.get(0).getName();
|
||||
// }
|
||||
// else {
|
||||
// // Create a synthetic (embedded composite) property to use as the referenced property which
|
||||
// // contains all the properties mapped to the referenced columns. We need to make a shallow copy
|
||||
// // of the properties to mark them as non-insertable/updatable.
|
||||
//
|
||||
// // todo : what if the columns all match with an existing component?
|
||||
//
|
||||
// StringBuilder propertyNameBuffer = new StringBuilder( "_" );
|
||||
// propertyNameBuffer.append( associatedClass.getEntityName().replace( '.', '_' ) );
|
||||
// propertyNameBuffer.append( "_" ).append( columns[0].getPropertyName() );
|
||||
// String syntheticPropertyName = propertyNameBuffer.toString();
|
||||
// //create an embeddable component
|
||||
//
|
||||
// //todo how about properties.size() == 1, this should be much simpler
|
||||
// Component embeddedComp = columnOwner instanceof PersistentClass ?
|
||||
// new Component( mappings, (PersistentClass) columnOwner ) :
|
||||
// new Component( mappings, (Join) columnOwner );
|
||||
// embeddedComp.setEmbedded( true );
|
||||
// embeddedComp.setNodeName( syntheticPropertyName );
|
||||
// embeddedComp.setComponentClassName( embeddedComp.getOwner().getClassName() );
|
||||
// for (Property property : properties) {
|
||||
// Property clone = BinderHelper.shallowCopy( property );
|
||||
// clone.setInsertable( false );
|
||||
// clone.setUpdateable( false );
|
||||
// clone.setNaturalIdentifier( false );
|
||||
// clone.setGeneration( property.getGeneration() );
|
||||
// embeddedComp.addProperty( clone );
|
||||
// }
|
||||
// SyntheticProperty synthProp = new SyntheticProperty();
|
||||
// synthProp.setName( syntheticPropertyName );
|
||||
// synthProp.setNodeName( syntheticPropertyName );
|
||||
// synthProp.setPersistentClass( ownerEntity );
|
||||
// synthProp.setUpdateable( false );
|
||||
// synthProp.setInsertable( false );
|
||||
// synthProp.setValue( embeddedComp );
|
||||
// synthProp.setPropertyAccessorName( "embedded" );
|
||||
// ownerEntity.addProperty( synthProp );
|
||||
// //make it unique
|
||||
// TableBinder.createUniqueConstraint( embeddedComp );
|
||||
//
|
||||
// referencedPropertyName = syntheticPropertyName;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * creating the property ref to the new synthetic property
|
||||
// */
|
||||
// if ( value instanceof ToOne ) {
|
||||
// ( (ToOne) value ).setReferencedPropertyName( referencedPropertyName );
|
||||
// mappings.addUniquePropertyReference( ownerEntity.getEntityName(), referencedPropertyName );
|
||||
// }
|
||||
// else if ( value instanceof Collection ) {
|
||||
// ( (Collection) value ).setReferencedPropertyName( referencedPropertyName );
|
||||
// //not unique because we could create a mtm wo association table
|
||||
// mappings.addPropertyReference( ownerEntity.getEntityName(), referencedPropertyName );
|
||||
// }
|
||||
// else {
|
||||
// throw new AssertionFailure(
|
||||
// "Do a property ref on an unexpected Value type: "
|
||||
// + value.getClass().getName()
|
||||
// );
|
||||
// }
|
||||
// mappings.addPropertyReferencedAssociation(
|
||||
// ( inverse ? "inverse__" : "" ) + associatedClass.getEntityName(),
|
||||
// columns[0].getPropertyName(),
|
||||
// referencedPropertyName
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
public static void createSyntheticPropertyReference(
|
||||
Ejb3JoinColumn[] columns,
|
||||
|
|
|
@ -32,6 +32,9 @@ import org.hibernate.property.access.spi.Getter;
|
|||
* @see org.hibernate.tuple.entity.EntityTuplizer
|
||||
* @see org.hibernate.tuple.component.ComponentTuplizer
|
||||
*
|
||||
* @deprecated for removal in 6.0. See instead `ManagedTypeRepresentationStrategy`
|
||||
* and `RepresentationMode` in 6.0
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*
|
||||
* @deprecated See {@link org.hibernate.metamodel.spi.ManagedTypeRepresentationStrategy}
|
||||
|
|
|
@ -20,7 +20,11 @@ import org.hibernate.tuple.Tuplizer;
|
|||
*
|
||||
* @author Gavin King
|
||||
* @author Steve Ebersole
|
||||
*
|
||||
* @deprecated for removal in 6.0. See instead `ManagedTypeRepresentationStrategy`
|
||||
* and `RepresentationMode` in 6.0
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ComponentTuplizer extends Tuplizer, Serializable {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue