import { AbstractNamingStrategy } from './AbstractNamingStrategy' ; export class MongoNamingStrategy extends AbstractNamingStrategy { classToTableName ( entityName ) { return entityName . replace ( /([a-z])([A-Z])/g , '$1-$2' ) . toLowerCase ( ) ; } joinColumnName ( propertyName ) { return propertyName ; } joinKeyColumnName ( entityName , referencedColumnName ? ) { return entityName ; } joinTableName ( sourceEntity , targetEntity , propertyName ) { return '' ; } propertyToColumnName ( propertyName ) { return propertyName ; } referenceColumnName ( ) { return '_id' ; } }