@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { // JPA states we should use the following as default: // "The concatenated names of the two associated primary entity tables (owning side // first), separated by an underscore." // aka: // {OWNING SIDE PRIMARY TABLE NAME}_{NON-OWNING SIDE PRIMARY TABLE NAME} final String name = source.getOwningPhysicalTableName() + '_' + source.getNonOwningPhysicalTableName(); return toIdentifier( name, source.getBuildingContext() ); }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { String name = source.getOwningPhysicalTableName() + "_" + source.getAssociationOwningAttributePath().getProperty(); return toIdentifier(name, source.getBuildingContext()); }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { if ( source.getAssociationOwningAttributePath() != null ) { final String name = source.getOwningPhysicalTableName() + '_' + transformAttributePath( source.getAssociationOwningAttributePath() ); return toIdentifier( name, source.getBuildingContext() ); } return super.determineJoinTableName( source ); } }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { final String ownerPortion = source.getOwningPhysicalTableName(); final String ownedPortion; if ( source.getNonOwningPhysicalTableName() != null ) { ownedPortion = source.getNonOwningPhysicalTableName(); } else { ownedPortion = transformAttributePath( source.getAssociationOwningAttributePath() ); } return toIdentifier( ownerPortion + "_" + ownedPortion, source.getBuildingContext() ); }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { // JPA states we should use the following as default: // "The concatenated names of the two associated primary entity tables (owning side // first), separated by an underscore." // aka: // {OWNING SIDE PRIMARY TABLE NAME}_{NON-OWNING SIDE PRIMARY TABLE NAME} final String name = source.getOwningPhysicalTableName() + '_' + source.getNonOwningPhysicalTableName(); return toIdentifier( name, source.getBuildingContext() ); }
@Override public Identifier determineJoinTableName(final ImplicitJoinTableNameSource source) { final String name = source.getOwningPhysicalTableName() + '_' + transformAttributePath(source.getAssociationOwningAttributePath()); return toIdentifier(name, source.getBuildingContext()); }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { String name = source.getOwningPhysicalTableName() + "_" + source.getAssociationOwningAttributePath().getProperty(); return toIdentifier(name, source.getBuildingContext()); }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { final String ownerPortion = source.getOwningPhysicalTableName(); final String ownedPortion; if ( source.getNonOwningPhysicalTableName() != null ) { ownedPortion = source.getNonOwningPhysicalTableName(); } else { ownedPortion = transformAttributePath( source.getAssociationOwningAttributePath() ); } return toIdentifier( ownerPortion + "_" + ownedPortion, source.getBuildingContext() ); }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { if ( source.getAssociationOwningAttributePath() != null ) { final String name = source.getOwningPhysicalTableName() + '_' + transformAttributePath( source.getAssociationOwningAttributePath() ); return toIdentifier( name, source.getBuildingContext() ); } return super.determineJoinTableName( source ); } }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { Identifier i = super.determineJoinTableName(source); LOGGER.trace("determineJoinTableName {} {} {} {} {} -> {}", source.getOwningEntityNaming(), source.getOwningPhysicalTableName(), source.getNonOwningEntityNaming(), source.getNonOwningPhysicalTableName(), source.getAssociationOwningAttributePath(), i); return i; }