MongoNamingStrategy
Hierarchy
- AbstractNamingStrategy
- MongoNamingStrategy
Index
Constructors
constructor
Returns MongoNamingStrategy
Methods
inheritedaliasName
Parameters
entityName: string
index: number
Returns string
inheritedclassToMigrationName
Return a migration name. This name should allow ordering.
Parameters
timestamp: string
optionalcustomMigrationName: string
Returns string
classToTableName
Return a table name for an entity class
Parameters
entityName: string
Returns string
inheritedcolumnNameToProperty
Return a property for a column name (used in
EntityGenerator
).Parameters
columnName: string
Returns string
inheritedenumValueToEnumProperty
Get an enum option name for a given enum value.
Parameters
enumValue: string
The enum value to generate a name for.
columnName: string
The column name which has the enum.
tableName: string
The table name of the column.
optionalschemaName: string
The schema name of the column.
Returns string
The name of the enum property that will hold the value.
inheritedgetClassName
Return a name of the class based on its file name
Parameters
file: string
separator: string = '-'
Returns string
inheritedgetEntityName
Return a name of the entity class based on database table name (used in
EntityGenerator
). Default implementation ignores the schema name.Parameters
tableName: string
optionalschemaName: string
Returns string
inheritedgetEnumClassName
Get an enum class name.
Parameters
columnName: string
The column name which has the enum.
tableName: string
The table name of the column.
optionalschemaName: string
The schema name of the column.
Returns string
A new class name that will be used for the enum.
inheritedindexName
Returns key/constraint name for the 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: primary | index | unique | foreign | sequence | check
Returns string
inheritedinverseSideName
Returns the name of the inverse side property. Used in the
EntityGenerator
withbidirectionalRelations
option.Parameters
entityName: string
propertyName: string
kind: ReferenceKind
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
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.