New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User relations are not loaded when querying /users/{id} endpoint #7197
Labels
issue: bug
Issue reporting a bug
severity: medium
If it breaks the basic use of the product but can be worked around
source: core:strapi
Source is core/strapi package
status: confirmed
Confirmed by a Strapi Team member or multiple community members
Comments
13 tasks
juandl
added a commit
to juandl/strapi
that referenced
this issue
Jul 27, 2020
To avoid issue with population we change the service of state user to there own service call "fetchState", also to keep a separate customization
13 tasks
juandl
added a commit
to juandl/strapi
that referenced
this issue
Jul 27, 2020
To avoid issue with population we change the service of state user to there own service call "fetchState", also to keep a separate customization Signed-off-by: Juan David <juand.business@gmail.com>
lauriejim
added
severity: medium
If it breaks the basic use of the product but can be worked around
source: core:strapi
Source is core/strapi package
status: confirmed
Confirmed by a Strapi Team member or multiple community members
issue: bug
Issue reporting a bug
labels
Jul 27, 2020
juandl
added a commit
to juandl/strapi
that referenced
this issue
Jul 27, 2020
To avoid issue with population we change the service of state user to there own service call "fetchState", also to keep a separate customization Signed-off-by: Juan David <juand.business@gmail.com>
juandl
added a commit
to juandl/strapi
that referenced
this issue
Jul 27, 2020
To avoid issue with population we change the service of state user to there own service call "fetchState", also to keep a separate customization Signed-off-by: Juan David <juand.business@gmail.com>
juandl
added a commit
to juandl/strapi
that referenced
this issue
Jul 27, 2020
To avoid issue with population we change the service of state user to there own service call "fetchState", also to keep a separate customization Signed-off-by: Juan David <juand.business@gmail.com>
alexandrebodin
pushed a commit
that referenced
this issue
Jul 28, 2020
* Fix/#7197/Change custom populate state to own service To avoid issue with population we change the service of state user to there own service call "fetchState", also to keep a separate customization Signed-off-by: Juan David <juand.business@gmail.com> * specific service for fetch authenticated user Signed-off-by: Juan David <juand.business@gmail.com> * Update comment Signed-off-by: Juan David <juand.business@gmail.com> * Add some comments Signed-off-by: Juan David <juand.business@gmail.com>
gilfernandes
pushed a commit
to onepointconsulting/strapi
that referenced
this issue
Aug 13, 2020
) * Fix/strapi#7197/Change custom populate state to own service To avoid issue with population we change the service of state user to there own service call "fetchState", also to keep a separate customization Signed-off-by: Juan David <juand.business@gmail.com> * specific service for fetch authenticated user Signed-off-by: Juan David <juand.business@gmail.com> * Update comment Signed-off-by: Juan David <juand.business@gmail.com> * Add some comments Signed-off-by: Juan David <juand.business@gmail.com> Signed-off-by: Gil Fernandes <gil.fernandes@onepointltd.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
issue: bug
Issue reporting a bug
severity: medium
If it breaks the basic use of the product but can be worked around
source: core:strapi
Source is core/strapi package
status: confirmed
Confirmed by a Strapi Team member or multiple community members
Describe the bug
After I upgraded my Strapi project from 3.0.5 to 3.1.1, /users/{id} endpoint no longer populates the relational fields, i.e. my User model has a "has one" relation to some other collection and previously /users/{id} populated the relational field with all the data from the related item, but now only the item's id is returned. However, if I query /users?id=8 then the related fields are properly populated. All other collections seem to populate all the related fields properly.
Steps to reproduce the behavior
Expected behavior
I expect the API to return a User object with a "test" field populated like "{ id: 1, title: "asdf", ... }", like it was in version 3.0.5.
Current behavior
The API does not populate the "test" field and returns only the id of the related item.
System
Additional context
My Strapi project is running in Docker container with official Strapi image "strapi/strapi:3.1.1-node12". It was version "strapi/strapi:3.0.5-node12" but I updated it because I needed OR and AND operators in REST API queries. I also followed the migration guide https://strapi.io/documentation/v3.x/migration-guide/migration-guide-3.0.x-to-3.1.x.html.
The text was updated successfully, but these errors were encountered: