Skip to content

[SPIKE] HasMany relation definition to REST API with auto-generated repository/controller classes #3896

@emonddr

Description

@emonddr

In LoopBack 3, it is very easy to get a fully-featured relational REST API with very little code: a model definition describing model relations + a model configuration specifying which datasource to use.

Let's enhance the solution provided by #2036 to include support for relations too.

This spike will focus on the hasMany relation, and will serve as an example of how to approach the other relations (supported by LB4).

  • User creates a model class and uses decorators to define a hasMany model relation

  • User declaratively defines what kind of data-access patterns to provide (CRUD, KeyValue, etc.) and what datasource to use under the hood - will be provided by From model definition to REST API with no custom repository/controller classes #2036

  • @loopback/boot processes this configuration and registers appropriate repositories & controllers with the app.

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions