Skip to content
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

Fix wrong query generation with bookshelf #8228

Merged
merged 1 commit into from Oct 7, 2020

Conversation

Convly
Copy link
Member

@Convly Convly commented Oct 7, 2020

fix #8225

Fix wrong behaviour from bookshelf's populate which was extending custom populate queries for each part of the deep path instead of only extending the full path and binding populate queries to the rest.

The fix consist of extending the original query only for the full path. Binding only populate queries otherwise.

@Convly Convly added issue: bug Issue reporting a bug source: core:database Source is core/database package labels Oct 7, 2020
@Convly Convly added this to the 3.2.2 milestone Oct 7, 2020
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
@Convly Convly force-pushed the fix/wrong-query-generation-bookshelf branch from 86219ee to 92aae44 Compare October 7, 2020 15:09
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting for the tests

@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

Merging #8228 into master will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8228      +/-   ##
==========================================
+ Coverage   32.96%   33.03%   +0.07%     
==========================================
  Files        1197     1219      +22     
  Lines       13020    13563     +543     
  Branches     1286     1348      +62     
==========================================
+ Hits         4292     4481     +189     
- Misses       7885     8200     +315     
- Partials      843      882      +39     
Flag Coverage Δ
#front 24.71% <ø> (-0.35%) ⬇️
#unit 54.10% <ø> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rapi-admin/admin/src/hooks/useFetchRole/reducer.js 80.00% <0.00%> (-20.00%) ⬇️
...min/admin/src/components/Roles/Permissions/init.js 80.00% <0.00%> (-20.00%) ⬇️
packages/strapi-admin/services/permission.js 77.57% <0.00%> (-14.00%) ⬇️
...in/src/containers/Users/ProtectedEditPage/index.js 87.50% <0.00%> (-12.50%) ⬇️
...t-type-builder/controllers/validation/relations.js 50.00% <0.00%> (-12.50%) ⬇️
.../admin/src/components/Roles/Permissions/reducer.js 85.41% <0.00%> (-12.15%) ⬇️
...ages/strapi/lib/services/entity-validator/index.js 54.11% <0.00%> (-9.78%) ⬇️
packages/strapi/lib/core-api/service.js 64.44% <0.00%> (-4.79%) ⬇️
.../admin/src/containers/Webhooks/EditView/reducer.js 82.35% <0.00%> (-4.32%) ⬇️
...admin/admin/src/containers/Roles/EditPage/index.js 55.17% <0.00%> (-4.09%) ⬇️
... and 106 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0287c8...92aae44. Read the comment docs.

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 source: core:database Source is core/database package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bookshelf generating wrong query in strapi v3.2.0
2 participants