scoutforpets / jsonapi-mapper

JSON API-Compliant Serialization for your Node ORM
The Unlicense
42 stars 24 forks source link

relations currently aren't returned in links if relations aren't returned in the model #13

Closed jamesdixon closed 8 years ago

jamesdixon commented 9 years ago

This is an issue that stems from Bookshelf not returning relations if withRelated isn't specified on the query. It can be worked around by manually specifying the relations on the model, but unfortunately, there is an issue with the JSON API serializer that won't return a null data element for relations that have no attributes. Opened issues in both repositories.

jamesdixon commented 8 years ago

Closing in favor of #23