Issue with Entity Modification and Query Results #361
Unanswered
daniel7byte
asked this question in
Q&A
Replies: 1 comment
-
Update: I had been thinking that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have encountered an issue with my current setup involving the entities Users and Pets (code attached). Initially, when I create a Pet for a User, everything works as expected. Queries to retrieve all Pets or to filter by Users return the correct results.
However, the problem arises when I edit a Pet. Although the edit is successful, the Pet no longer appears in the query results of the ByUserIdCollection. This discrepancy occurs because the "gsic5sk" value changes upon editing.
During creation, the
gsic5sk
is set to$users#pet_1
. Subsequently, in the ByUserIdCollection query, it matches$users#pet_1
and retrieves the record successfully. However, after an UPDATE/PATCH operation, thegsic5sk
changes to$users
, which disrupts the ByUserIdCollection query as it fails to find the record.Playground Link
To address this issue, I have implemented Access Patterns without the following attributes:
Is this approach correct? Is it a bug in the system, or is there a preferred method for handling this situation?
Thank you for your assistance and insights.
Beta Was this translation helpful? Give feedback.
All reactions