jsonapi-serializer icon indicating copy to clipboard operation
jsonapi-serializer copied to clipboard

Fix relationships when two types start with the same string

Open JulienPradet opened this issue 5 years ago • 4 comments

Hi :wave:

First of all, thanks for open sourcing this lib !

I've found a bug when working with a JSON API that have both the products and productsearch type. It created a conflict when looking for an ancestry and the products's relationships weren't included although they should be.

Before this PR, json.product.image didn't exist in the test I've added.

Not sure if ; is the best separator here but since there is already : in use I guess it's OK.

JulienPradet avatar Apr 27 '20 14:04 JulienPradet

Please merge - we are running into the same problem

ahinvision avatar May 11 '20 14:05 ahinvision

We could use this fix as well here. Please consider merging @SeyZ :)

csprle avatar May 11 '20 14:05 csprle

@SeyZ I'm so sorry, could you possibly share the maintenance of this repository with someone else so that someone can develop this package? Thanks. Also @JulienPradet This pull request fixes the issue but creates another, namely an extra nesting of data, "user": { "id": 1, "profile": { "user": "id": 1, ... }}}.

bodasia avatar Nov 27 '23 16:11 bodasia

@slimee maybe you have access to resolve this issue?

bodasia avatar Nov 28 '23 07:11 bodasia