Missing relationship data for included relationship
Other bug: when serializing a Post, and including comments, comments.post, comments.post.author, the author relationship of the primary post does not get populated, though comments.post refers to the primary post.
More generally, I believe there is an undefined behavior when a related resource can be reached via multiple relationship paths.
https://github.com/fotinakis/jsonapi-serializers/blob/master/lib/jsonapi-serializers/serializer.rb#L115 https://github.com/fotinakis/jsonapi-serializers/blob/master/lib/jsonapi-serializers/serializer.rb#L150
I see an issue in these lines:
lets take an example above /get/posts?include=comment.author
in lines above default inslude_data is false and @_include_linkages never has comment match
this means that you will have list of posts and included list of comments but without data block and you cannot match them on client
My immediate impression is that include_data should be defaulted to true, why not?
@ababich I believe your are referring to a different issue (namely that of full-linkage being incidentally broken by relationships' include data being omitted).