angular2-jsonapi
angular2-jsonapi copied to clipboard
Questions about relationships
Hi, Not clear how to work with relationships and jsonapi2angular library.
First question is: Are BelongsTo and HasMany mandatory for all relationships?
Thank you
Yes, if you want to indicate, that an attribute in your model is a relationship, you should either use the @BelongsTo or @HasMany decorator (depending on the relationship).
For OneToOne relations you can check this comment