HHH-13496 Remove some more dead code from TableBinder

This commit is contained in:
Sanne Grinovero 2019-07-24 17:37:22 +01:00
parent d5ea37d779
commit a2aee7917b
1 changed files with 2 additions and 13 deletions

View File

@ -137,21 +137,12 @@ public class TableBinder {
// only bind association table currently
public Table bind() {
final Identifier ownerEntityTableNameIdentifier = toIdentifier( ownerEntityTable );
final Identifier associatedEntityTableNameIdentifier = toIdentifier( associatedEntityTable );
//logicalName only accurate for assoc table...
final String unquotedOwnerTable = StringHelper.unquote( ownerEntityTable );
final String unquotedAssocTable = StringHelper.unquote( associatedEntityTable );
//@ElementCollection use ownerEntity_property instead of the cleaner ownerTableName_property
// ownerEntity can be null when the table name is explicitly set; <== gb: doesn't seem to be true...
final String ownerObjectName = isJPA2ElementCollection && ownerEntity != null
? StringHelper.unqualify( ownerEntity )
: unquotedOwnerTable;
final ObjectNameSource nameSource = buildNameContext(
ownerObjectName,
unquotedAssocTable
);
final ObjectNameSource nameSource = buildNameContext();
final boolean ownerEntityTableQuoted = StringHelper.isQuoted( ownerEntityTable );
final boolean associatedEntityTableQuoted = StringHelper.isQuoted( associatedEntityTable );
@ -318,9 +309,7 @@ public class TableBinder {
.toIdentifier( tableName );
}
private ObjectNameSource buildNameContext(
String unquotedOwnerTable,
String unquotedAssocTable) {
private ObjectNameSource buildNameContext() {
if ( name != null ) {
return new AssociationTableNameSource( name, null );
}