ManyToManyOptions

ManyToManyOptions: RelationshipOptions & object | object

mappedBy#

Optional mappedBy: string

The name of the relationship as defined in the other data model. This is only required by the belongsTo and manyToMany relationship method.


pivotTable#

Optional pivotTable: string

The name of the pivot table created in the database for this relationship.


joinColumn#

Optional joinColumn: string | string[]

The column name in the pivot table that for the current entity


inverseJoinColumn#

Optional inverseJoinColumn: string | string[]

The column name in the pivot table for the opposite entity


pivotEntity#

Optional pivotEntity: () => DmlEntity<any, any>

A function that returns the data model representing the pivot table created in the database for this relationship.

Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break