-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
_op: delete returning on after save object result #8386
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
Comments
Thanks for opening this issue!
|
Isn't this expected? The purpose of I think if a key is unset in a beforeSave trigger though, the |
the op is returning to the client, this is not expected. This never happened in previous versions. In iOS for example, I use codable, and to the serialization works, it have to return String or null, if it return an different type it will not work. |
from @dblythy in other issue I created, I think this is the solution (I don't know if this problem is on the version 6) |
So does returning |
Yes, because if I'm unsetting the field, it is optional, so it will work with null. |
Yeah, I think that's how it should work for all other ops. I guess for an increment op, it could help keep the values in sync across multiple editors. What are your thoughts @mtrezza? |
So from my understanding, this is enough to return an
|
I think a complete example with actual vs expected outcome would help to understand the issue and possible implications of the change. |
Yes this is enough to understand. |
At the moment, if It's also possible to return |
As I read it, Is there a currently existing feature that has the purpose of transmitting pending potential future states to clients? If there is one, but a client SDK doesn't support it, then it either lacks a feature or has a bug. If there is no such feature, then we probably shouldn't consider it one, just because it appears to exist because it triggers something on the client side for certain SDKs. It may not actually work as is but require further analysis and proper implementation. In other words, if a developer decides to manipulate the response object in We probably also cannot make any assumptions about speculative operations, therefore, the known only value is the value before the operation. So in lieu of |
The question is, that never was sent to the after save, because in the after save the op is not pending at all. It was successful done. |
New Issue Checklist
Issue Description
When we save an object on parse and delete a property, it is returning in the API { __op: 'Delete' }
We manipulate the object on AfterSave and print it before returning, and it doesn't appear these values.
It looks like it is added after the afterSave.
Steps to reproduce
Delete a value on a property field:
Actual Outcome
Expected Outcome
Don't return these information, because it broke the Model serialization in the apps front end
Environment
Parse server Version 5.4.0 with MongoDB 5
Server
Database
Logs
The text was updated successfully, but these errors were encountered: