@nhtio/web-re-active-record/relationships
The relationships which can be defined for models
Classes
Class | Description |
---|---|
BelongsTo | Represents a relationship between two models where the ID of the foreign model is stored as a property of the originating model. |
HasMany | Represents a one-to-many relationship between models where the ID of the originating model is stored as a property of the foreign model. |
HasManyThrough | Represents a one-to-many relationship between models where the ID of the originating model is stored as a property of one or many "glue" models which connect to the foreign model. |
HasOne | Represents a one-to-one relationship between two models where the ID of the originating model is stored as a property of the foreign model. |
ManyToMany | Represents a many-to-many relationship between models where the IDs of both models are stored in a join table (pivot table). |
MorphMany | Represents a relationship between two models where the table and primary key of the foreign model stored as a property of the originating model. |
MorphOne | Represents a relationship between two models where the table and primary key of the foreign model stored as a property of the originating model. |
MorphTo | Represents a relationship between two models where the table of the foreign model and the ID of the foreign model is stored as a property of the originating model. |
Type Aliases
Type Alias | Description |
---|---|
BelongsToConfiguration | The configuration for a BelongsTo relationship. |
ChainableRelationship | Describes a class which defines a relationship between models which can be used in a chain. |
ChainableRelationshipConfiguration | Describes the configuration tuples for the relationship classes which can be used in a chain. |
HasManyConfiguration | The configuration for a HasMany relationship. |
HasManyThroughConfiguration | The configuration for a HasManyThrough relationship. |
HasOneConfiguration | The configuration for a HasOne relationship. |
ManyToManyConfiguration | The configuration for a ManyToMany relationship. |
MorphManyConfiguration | The configuration for a MorphMany relationship. |
MorphOneConfiguration | The configuration for a MorphOne relationship. |
MorphToConfiguration | The configuration for a MorphTo relationship. |
Relationship | Describes a class which defines a relationship between models. |
RelationshipConfiguration | Describes the configuration tuples for the relationship classes. |
RelationshipCtor | Describes the constructor for a class which defines a relationship between models. |