@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) { final String ownerPortion = transformEntityName( source.getOwningEntityNaming() ); final String ownedPortion; if ( source.getNonOwningEntityNaming() != null ) { ownedPortion = transformEntityName( source.getNonOwningEntityNaming() ); } 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) { String ownerEntity = source.getOwningEntityNaming().getEntityName(); String ownerEntityTable = NamingStrategyUtils.unqualifyEntityName(ownerEntity); String associatedEntity = source.getNonOwningEntityNaming().getEntityName(); String associatedEntityTable = NamingStrategyUtils.unqualifyEntityName(associatedEntity); String propertyName = getPropertyName(source.getAssociationOwningAttributePath()); String result = hibernate4Strategy.collectionTableName(ownerEntity, ownerEntityTable, associatedEntity, associatedEntityTable, propertyName); return toIdentifier(result, source.getBuildingContext()); }