-
Notifications
You must be signed in to change notification settings - Fork 17
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
Missing originalValues for collection of primitive types #78
Comments
I also noticed a change of collection's content does not trigger propertyChange action. |
Hi @mahish, the message "items may be added or removed but the collection may not be changed" means what you said: that you can change the content of the collection but not the collection itself. In other words, you should not attempt to replace the collection with a new array. Part of the reason for this is that Breeze collections are not simple arrays; they are "smart" collections that manage the relationships between entities when they are added or removed from collections. It seems that that updating the |
@steveschmitt Hi and thank you for the reply. Yeah, I see. Thank you for clarification. I totally understand replacement of the collection itself is not allowed. I was interested in whether a collection's elements has changed (adding, removing). I found out there is I understand the difficulty you mean but I still see a value of adding support for |
Recently, I've worked with Is there anything I can do about it? Would you welcome PR from me as a starting point? Thanks. |
Yes, a PR would be great. Thank you. |
@mahish Have you made any progress on this? |
@steveschmitt Hi, we are weeks from important release. Part of the release is my set of helpers handling changes of the collection type. I should be able to transform these helpers to the PR during October. |
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 theoriginalValues
map, as described in the originalValues documentation or hereWhile 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
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)?
originalValues
pending and waiting for implementation in case of collection of primitive types?I would appreciate any clarification on this matter. Thanks a lot.
The text was updated successfully, but these errors were encountered: