ManyToManyOptions <Owner, Target>
Hierarchy
- ReferenceOptions<Owner, Target>
- ManyToManyOptions
Index
Properties
- autoincrement
- cascade
- check
- columnType
- comment
- concurrencyCheck
- customOrder
- default
- defaultRaw
- deleteRule
- eager
- entity
- extra
- fieldName
- fieldNames
- fixedOrder
- fixedOrderColumn
- formula
- generated
- getter
- getterName
- groups
- hidden
- hydrate
- ignoreSchemaChanges
- index
- inversedBy
- inverseJoinColumn
- inverseJoinColumns
- joinColumn
- joinColumns
- lazy
- length
- mappedBy
- name
- nullable
- onCreate
- onUpdate
- orderBy
- owner
- persist
- pivotEntity
- pivotTable
- precision
- primary
- ref
- referenceColumnName
- referencedColumnNames
- returning
- runtimeType
- scale
- serializedName
- serializedPrimaryKey
- serializer
- setter
- strategy
- trackChanges
- type
- unique
- unsigned
- updateRule
- version
- where
Properties
optionalinheritedautoincrement
optionalinheritedcascade
Set what actions on owning entity should be cascaded to the relationship. Defaults to [Cascade.PERSIST, Cascade.MERGE] (see cascading).
optionalinheritedcheck
Specify column with check constraints. (Postgres driver only)
optionalinheritedcolumnType
Specify exact database column type for Generator. (SQL only)
optionalinheritedcomment
Specify comment of column for Generator. (SQL only)
optionalinheritedconcurrencyCheck
Set to true to enable Locking via concurrency fields.
optionalinheritedcustomOrder
Specify a custom order based on the values. (SQL only)
optionalinheriteddefault
Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only)
optionalinheriteddefaultRaw
Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now()
optionaldeleteRule
What to do when the target entity gets deleted.
optionalinheritedeager
Always load the relationship. Discouraged for use with to-many relations for performance reasons.
optionalinheritedentity
Set target entity type.
optionalinheritedextra
mysql only
optionalinheritedfieldName
Specify database column name for this property.
optionalinheritedfieldNames
Specify database column names for this property.
Same as fieldName
but for composite FKs.
optionalfixedOrder
Force stable insertion order of items in the collection (see Collections).
optionalfixedOrderColumn
Override default order column name (id
) for fixed ordering.
optionalinheritedformula
Set to map some SQL snippet for the entity.
optionalinheritedgenerated
For generated columns. This will be appended to the column type after the generated always
clause.
optionalinheritedgetter
Set true to define the properties as getter. (virtual)
optionalinheritedgetterName
When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name.
optionalinheritedgroups
Specify serialization groups for serialize()
calls. If a property does not specify any group, it will be included,
otherwise only properties with a matching group are included.
optionalinheritedhidden
Set to true to omit the property when Serializing.
optionalinheritedhydrate
Set false to disable hydration of this property. Useful for persisted getters.
optionalinheritedignoreSchemaChanges
Set to avoid a perpetual diff from the Generator when columns are generated.
optionalinheritedindex
Explicitly specify index on a property.
optionalinversedBy
Point to the inverse side property name.
optionalinverseJoinColumn
Override the default database column name on the inverse side (see Naming Strategy). This option is only for simple properties represented by a single column.
optionalinverseJoinColumns
Override the default database column name on the inverse side (see Naming Strategy). This option is suitable for composite keys, where one property is represented by multiple columns.
optionaljoinColumn
Override the default database column name on the owning side (see Naming Strategy). This option is only for simple properties represented by a single column.
optionaljoinColumns
Override the default database column name on the owning side (see Naming Strategy). This option is suitable for composite keys, where one property is represented by multiple columns.
optionalinheritedlazy
Set to omit the property from the select clause for lazy loading.
optionalinheritedlength
Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only)
optionalmappedBy
Point to the owning side property name.
optionalinheritedname
Alias for fieldName
.
optionalinheritednullable
Set column as nullable for Generator.
optionalinheritedonCreate
Automatically set the property value when entity gets created, executed during flush operation.
Type declaration
Parameters
entity: Owner
em: EntityManager<IDatabaseDriver<Connection>>
Returns any
optionalinheritedonUpdate
Automatically update the property value every time entity gets updated, executed during flush operation.
Type declaration
Parameters
entity: Owner
em: EntityManager<IDatabaseDriver<Connection>>
Returns any
optionalorderBy
Set default ordering.
optionalowner
Set this side as owning. Owning side is where the foreign key is defined. This option is not required if you use inversedBy
or mappedBy
to distinguish owning and inverse side.
optionalinheritedpersist
Set false to define Property.
optionalpivotEntity
Set pivot entity for this relation (see Custom pivot table entity).
optionalpivotTable
Override default name for pivot table (see Naming Strategy).
optionalinheritedprecision
Set precision of database column to represent the number of significant digits. (SQL only)
optionalinheritedprimary
Set true to define entity's unique primary key identifier.
Alias for @PrimaryKey()
decorator
optionalinheritedref
Enable ScalarReference
wrapper for lazy values. Use this in combination with lazy: true
to have a type-safe accessor object in place of the value.
optionalreferenceColumnName
Override the default database column name on the target entity (see Naming Strategy). This option is only for simple properties represented by a single column.
optionalreferencedColumnNames
Override the default database column name on the target entity (see Naming Strategy). This option is suitable for composite keys, where one property is represented by multiple columns.
optionalinheritedreturning
Add the property to the returning
statement.
optionalinheritedruntimeType
Runtime type of the property. This is the JS type that your property is mapped to, e.g. string
or number
, and is normally inferred automatically via reflect-metadata
.
In some cases, the inference won't work, and you might need to specify the runtimeType
explicitly - the most common one is when you use a union type with null like foo: number | null
.
optionalinheritedscale
Set scale of database column to represents the number of digits after the decimal point. (SQL only)
optionalinheritedserializedName
Specify name of key for the serialized value.
optionalinheritedserializedPrimaryKey
Set to define serialized primary key for MongoDB. (virtual)
Alias for @SerializedPrimaryKey()
decorator.
optionalinheritedserializer
Set to use serialize property. Allow to specify a callback that will be used when serializing a property.
Type declaration
Parameters
value: any
optionaloptions: SerializeOptions<any, never, never>
Returns any
optionalinheritedsetter
Set true to define the properties as setter. (virtual)
optionalinheritedstrategy
Override the default loading strategy for this property. This option has precedence over the global loadStrategy
, but can be overridden by FindOptions.strategy
.
optionalinheritedtrackChanges
Set false to disable change tracking on a property level.
optionalinheritedtype
Explicitly specify the runtime type.
optionalinheritedunique
Set column as unique for Generator. (SQL only)
optionalinheritedunsigned
Set column as unsigned for Generator. (SQL only)
optionalupdateRule
What to do when the reference to the target entity gets updated.
optionalinheritedversion
Set to true to enable Locking via version field. (SQL only)
optionalwhere
Condition for Declarative partial loading.
Explicitly specify the auto increment of the primary key.