Skip to content

[Relation] Support BelongsTo relation #1361

@dhmlau

Description

@dhmlau

Description / Steps to reproduce / Feature proposal

Add support for BelongsTo relation between two models. Stretch goal for DP3.

Acceptance Criteria

  • Update factory method to handle this relation
  • create interface for CRUD methods available for the relation. See this as an example.
    • create default class which implements the interface
  • Implement the belongsTo decorator
    • model decorator: infers the metadata for the relation
    • repository decorator: return the constrained target crud repository (possible name, belongsToRepository)
  • Address dual usage of hasMany and belongsTo for a two way relation definition
  • tests / docs / blog post

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions