import { AbstractNamingStrategy } from './AbstractNamingStrategy' ; /**
 * This strategy keeps original entity/property names for table/column.
 */ export class EntityCaseNamingStrategy extends AbstractNamingStrategy { classToTableName ( entityName ) { return entityName ; } joinColumnName ( propertyName ) { return propertyName ; } joinKeyColumnName ( entityName , referencedColumnName ? , composite = false ) { const name = entityName . substr ( 0 , 1 ) . toLowerCase ( ) + entityName . substr ( 1 ) ; if ( composite && referencedColumnName ) { return name + '_' + referencedColumnName ; } return name ; } joinTableName ( sourceEntity , targetEntity , propertyName ) { return this . classToTableName ( sourceEntity ) + '_' + this . propertyToColumnName ( propertyName ) ; } propertyToColumnName ( propertyName ) { return propertyName ; } referenceColumnName ( ) { return 'id' ; } }