NamingStrategy
Implemented by
Index
Methods
aliasName
Parameters
entityName: string
index: number
Returns string
classToMigrationName
Return a migration name. This name should allow ordering.
Parameters
timestamp: string
Returns string
classToTableName
Return a table name for an entity class
Parameters
entityName: string
Returns string
columnNameToProperty
Return a property for a column name (used in
EntityGenerator
).Parameters
columnName: string
Returns string
getClassName
Return a name of the class based on its file name
Parameters
file: string
optionalseparator: string
Returns string
indexName
Returns key/constraint name for given type. Some drivers might not support all the types (e.g. mysql and sqlite enforce the PK name).
Parameters
tableName: string
columns: string[]
type: index | unique | foreign | primary | sequence | check
Returns string
joinColumnName
Return a join column name for a property
Parameters
propertyName: string
Returns string
joinKeyColumnName
Return the foreign key column name for the given parameters
Parameters
entityName: string
optionalreferencedColumnName: string
optionalcomposite: boolean
Returns string
joinTableName
Return a join table name
Parameters
sourceEntity: string
targetEntity: string
propertyName: string
Returns string
propertyToColumnName
Return a column name for a property
Parameters
propertyName: string
Returns string
referenceColumnName
Return the default reference column name
Returns string
Returns alias name for given entity. The alias needs to be unique across the query, which is by default ensured via appended index parameter. It is optional to use it as long as you ensure it will be unique.