Closed ashrafhasson closed 5 years ago
It turns out using the related model's PhoenixView that is in turn enabled to use JaSerializer.DSL behaviour, instead of a custom serializer, is a better way to make this work.
I believe the documentation can be improved slightly to cover nested relationships in the context of a Phoenix app.
Thanks for the awesome lib!
Closing this issue since it seems like user error and it's not really clear how the docs could be improved. Happy to make updates to the docs if there's anything specific that should be addressed.
In ja_serializer 0.12.0, it appears that specifying
include: true
for a has_many relation does include the related data in the relationships but the included records have an empty attributes map.When not specifying
include: true
or setting it tofalse
, no included is rendered and the relationships is also impacted where it contains an empty map for the entries.What wrong am I doing here in this serializer? Appreciate any help.
Thanks!