- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
hasMany Relationship Method - API Reference
This method defines a relationship between two data models, where the owner of the relationship has many records of the related data model, but the related data model only has one owner.
For example, a store "hasMany" products.
Example#
Type Parameters#
T
objectOptionalThe type of the entity builder passed as a first parameter. By default, it's
a function returning the related model.
Parameters#
entityBuilder
TA function that returns the data model this model is related to.
The relationship's options.
Was this page helpful?