-
Notifications
You must be signed in to change notification settings - Fork 88
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
Possible bug when breeze processing the saveResult from saveChanges()? #150
Comments
This doesn't seem like correct behavior. Perhaps breeze thinks the foreign key value is just missing from the results, so it doesn't overwrite the current client value? Please post some code if you can. Thanks for pointing this out. |
I refactored my code a bit to fit all in one place so hope I didn't introduce typos in doing that.
Let me know if you need to see server side code too. But I am certain that the saveResult that is returned on the wire has the correct "null" value for the entity (
|
@steveschmitt anything else I can post that would help find the issue? |
@steveschmitt @wardbell I know this issue has been sitting for a long time, but I never could figure out an explanation besides it being some type of bug in breeze. I recently have come back to this problem and really need to tackle it. Any ideas, or hints where I can find an answer to this behavior? |
I am modifying the saveResult in AfterSaveEntities on server. (.Net, EF6). Everything is working good except a new problem coming up.
I am modifying an entity (client-side) to make the entity's foreign key null. The saveresult comes back from the server with a null foreign key on the entity as expected (checking the json response in Chrome Dev Tools).
When stepping through breeze.debug.js, the data returned from the ajax.post call that is made has the correct "null" value for the foreign key.
Somewhere though, and I cannot figure out where, breeze is "throwing away" the new "null" value and setting the foreign key back to the original value it had before I called saveChanges().
If I refresh my entire page, breeze grabs the correct data from server (the null foreign key is what is getting saved in the database).
But how come this foreign key field is getting reset after being returned into breeze correctly by the server.
Could this be a bug somewhere?
I can post some code but was wondering first if anyone recognized this behavior or if it is expected.
The text was updated successfully, but these errors were encountered: