angel_relations 1.0.1 copy "angel_relations: ^1.0.1" to clipboard
angel_relations: ^1.0.1 copied to clipboard

Database-agnostic relations between Angel services.

relations #

version 1.0.1 build status

Database-agnostic relations between Angel services.

// Authors owning one book
app.service('authors').afterAll(
    relations.hasOne('books', as: 'book', foreignKey: 'authorId'));

// Or multiple
app.service('authors').afterAll(
    relations.hasMany('books', foreignKey: 'authorId'));

// Or, books belonging to authors
app.service('books').afterAll(relations.belongsTo('authors'));

Supports:

  • hasOne
  • hasMany
  • hasManyThrough
  • belongsTo
  • belongsToMany
0
likes
25
pub points
0%
popularity

Publisher

unverified uploader

Database-agnostic relations between Angel services.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

angel_framework

More

Packages that depend on angel_relations