Breeze / breeze.server.net

Breeze support for .NET servers
MIT License
76 stars 62 forks source link

Entities deleted on server returned to server without info that they have been deleted. #40

Closed bronielsen closed 6 years ago

bronielsen commented 8 years ago

This issue is related to this issue on SO: http://stackoverflow.com/questions/16651889/entity-deleted-on-the-server-will-remain-unchanged-on-the-client-default-breeze

In my applicaiton, I add entities (marked "Deleted") to the saveMap in BeforeSaveEntities on the server. They get deleted on the server, but are returned to the client with no indication that they have been deleted. The client therefore has no chance of knowing that a server-deleted entity should be removed from the client cache.

Is there any way to inform the client that an entity has been deleted on the server (in BeforeSaveEntities)?

steveschmitt commented 7 years ago

We are working on this now.

steveschmitt commented 7 years ago

As of Breeze 1.6.0, the server can now send a DeletedKeys property in the save result that tells the client to remove them from the cache. See the Saving Changes and DataServiceAdapter pages for (a little) more information.