HHH-18136 remove Table.identifierValue which was just bad
Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
7d3d17de4c
commit
371fe8f51c
|
@ -77,15 +77,13 @@ public class GeneratorBinder {
|
|||
Map<String, IdentifierGeneratorDefinition> localGenerators) {
|
||||
LOG.debugf( "#makeIdGenerator(%s, %s, %s, %s, ...)", id, property, generatorType, generatorName );
|
||||
|
||||
final Table table = id.getTable();
|
||||
table.setIdentifierValue( id );
|
||||
//generator settings
|
||||
id.setIdentifierGeneratorStrategy( generatorType );
|
||||
|
||||
final Map<String,Object> parameters = new HashMap<>();
|
||||
|
||||
//always settable
|
||||
parameters.put( PersistentIdentifierGenerator.TABLE, table.getName() );
|
||||
parameters.put( PersistentIdentifierGenerator.TABLE, id.getTable().getName() );
|
||||
|
||||
if ( id.getColumnSpan() == 1 ) {
|
||||
parameters.put( PersistentIdentifierGenerator.PK, id.getColumns().get(0).getName() );
|
||||
|
|
|
@ -800,8 +800,6 @@ public class ModelBinder {
|
|||
identifierValue.setIdentifierGeneratorParameters( params );
|
||||
}
|
||||
|
||||
identifierValue.getTable().setIdentifierValue( identifierValue );
|
||||
|
||||
if ( isNotEmpty( unsavedValue ) ) {
|
||||
identifierValue.setNullValue( unsavedValue );
|
||||
}
|
||||
|
|
|
@ -180,11 +180,6 @@ public class ExportableColumn extends Column {
|
|||
public boolean isColumnUpdateable(int index) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetadataBuildingContext getBuildingContext() {
|
||||
return table.getIdentifierValue().getBuildingContext();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -392,8 +392,6 @@ public abstract class SimpleValue implements KeyValue {
|
|||
IdentifierGeneratorFactory identifierGeneratorFactory,
|
||||
Dialect dialect,
|
||||
RootClass rootClass) throws MappingException {
|
||||
getTable().setIdentifierValue( this );
|
||||
|
||||
if ( generator == null ) {
|
||||
if ( customIdGeneratorCreator != null ) {
|
||||
generator = customIdGeneratorCreator.createGenerator(
|
||||
|
@ -407,7 +405,6 @@ public abstract class SimpleValue implements KeyValue {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return generator;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,6 @@ public class Table implements Serializable, ContributableDatabaseObject {
|
|||
* contains all columns, including the primary key
|
||||
*/
|
||||
private final Map<String, Column> columns = new LinkedHashMap<>();
|
||||
private KeyValue idValue;
|
||||
private PrimaryKey primaryKey;
|
||||
private final Map<ForeignKeyKey, ForeignKey> foreignKeys = new LinkedHashMap<>();
|
||||
private final Map<String, Index> indexes = new LinkedHashMap<>();
|
||||
|
@ -692,14 +691,6 @@ public class Table implements Serializable, ContributableDatabaseObject {
|
|||
return uniqueInteger;
|
||||
}
|
||||
|
||||
public void setIdentifierValue(KeyValue idValue) {
|
||||
this.idValue = idValue;
|
||||
}
|
||||
|
||||
public KeyValue getIdentifierValue() {
|
||||
return idValue;
|
||||
}
|
||||
|
||||
@Deprecated(since = "6.2")
|
||||
public void addCheckConstraint(String constraint) {
|
||||
addCheck( new CheckConstraint( constraint ) );
|
||||
|
|
|
@ -228,7 +228,6 @@ class ColumnDefinitions {
|
|||
return table.hasPrimaryKey()
|
||||
&& table.getPrimaryKey().getColumnSpan() == 1
|
||||
&& table.getPrimaryKey().getColumn( 0 ).isIdentity();
|
||||
|
||||
}
|
||||
|
||||
private static String normalize(String typeName) {
|
||||
|
|
Loading…
Reference in New Issue