-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi,
I wanted to discuss an issue I encountered while working with a collection of primitive types. In my case, when an entity has a DataProperty with dp.isScalar === false, the state of the entity correctly changes to "Modified" when the content of the collection has been changed. However, I haven't noticed any effect of this state change in the originalValues map, as described in the originalValues documentation or here
While investigating this issue, I came across this code snippet in the repository
breeze-client/src/default-property-interceptor.ts
Lines 106 to 108 in b450f98
| if (!property.isScalar) { | |
| throw new Error("Nonscalar data properties are readonly - items may be added or removed but the collection may not be changed."); | |
| } |
First, I'm not recieving this error in my application. Second, the error message is not 100% clear to me so I would like to confirm my understanding here. Does "items may be added or removed but the collection may not be changed" mean that I can change its content but Im not able to change the collection itself => the reference (memory location)?
- if true, is the support for
originalValuespending and waiting for implementation in case of collection of primitive types? - if false, is there no plan to support it at all and I should handle it in my application in whatever way I need to?
I would appreciate any clarification on this matter. Thanks a lot.