Closed iulianb closed 2 years ago
I'm not sure what issue they tried to solve with this, but yes they are making the assumption that they can safely clone the bound objects. That's a bold assumption to make. In this case you will not be able to directly bind the Breeze entities and will have to make use of ViewModels and map the data back and forward.
In this case you will not be able to directly bind the Breeze entities and will have to make use of ViewModels and map the data back and forward.
This is what they suggested as well but we're too far down the road to rework the entire thing just because of this. So we've reiterated the problem in another support ticket and they are considering a change to account for this aspect. Thank you for your time!
Hi.
This is more of a need for confirmation rather than a bug/feature request. If it's inappropriate please let me know and I'll remove it.
A while ago DevExpress has made some changes to their DevExtreme library that introduced cloning of data objects (https://github.com/DevExpress/DevExtreme/commit/1970001bf3f6b35102e1c6c4f7de556fafaad326). This conflicts with the inner workings of breeze. For example,
entityState
comparison no longer works as the wholeentityAspect
property on a given entity is deep cloned after being edited in a grid (I've toyed around with movingentityAspect
and_backingStore
on the prototype after the entities are loaded from the server, but it fails on expanded properties).In my opinion, DevExtreme should not be altering the data objects it displays/edits further than setting the values on the properties configured for data binding. In their response to a support ticket I've opened they've mentioned that breeze doesn't support object cloning, which I find a little out of place.
Am I wrong in assuming the above?
Thank you. Iulian