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
It looks strange, why do I need to update something before deleting it.
Then, I raned the code in debug mode. On a screenshot below, I'm trying to delete OrganizationToUserLink.id == 54 . But, as you can see, it's also trying to set null user column where OrganizationToUserLink.user.id == 54 😲
The Keystone tries to update the value of neighboring records for all primary keys that refer to other tables. Probably there is missing a test, this code should only update the table references itself.
Bug report
I have lists like so:
And CI TEST which does something like:
When I run this code with a
DEBUG=knex:query,knex:tx
env I can see these queries:This queries is triggered by the code:
It looks strange, why do I need to update something before deleting it.
Then, I raned the code in debug mode. On a screenshot below, I'm trying to delete
OrganizationToUserLink.id == 54
. But, as you can see, it's also trying to set null user column whereOrganizationToUserLink.user.id == 54
😲The Keystone tries to update the value of neighboring records for all primary keys that refer to other tables. Probably there is missing a test, this code should only update the table references itself.
additional
I have a CI test here: https://github.com/8iq/nodejs-hackathon-boilerplate-starter-kit/runs/740039167
There is a reason why my tests fail on Postgres and work well on Mongo.
Because there is a different way to generate object ID.
On the Postgres, the mutation also updates other table rows and corrupt the table data.
The text was updated successfully, but these errors were encountered: