You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this! This project is far from done at the moment, so this is one of the options yet to be implemented. I guess that is "by design" so far, but realistically, it just needs to be added in!
This shouldn't be too hard to add for the embed :ids case or if no associations are present. I looked at the original AMS implementation and it only support root: false if sideloading is not used. Otherwise an error is raised:
ActiveModel::Serializer::IncludeError: CannotserializefooswhenFooSerializerdoes not havearoot!
This can be worked around by forcibly excluding all embedded records using the include: [] option.
Supporting embed: :objects would probably be much harder, because I think it can embed objects recursively, which would require quite some changes in the postgres code.
First of all, thanks for an awesome project.
When I render with plain active model serializers with
It produces an array of objects.
However when I put postgres_ext-serializers in place, it returns
In other words, the option of removing the root does not seem to be working.
The text was updated successfully, but these errors were encountered: