-
Notifications
You must be signed in to change notification settings - Fork 124
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
hasDirtyAttributes: true right after findAll #167
Comments
@abrararshad after some research I found that this problem is caused by this commit(bb1bfdf) where is absolutely ignored if its new instance created from query or not |
I can confirm this issue. Using Version 4.1.0 all attributes of my data objects are considered as "dirtyAttributes" - even right after loading them from the backend.
Using Version 4.0.0 this issue is gone and the first But still, if i have an attribute in the form like this:
changing one nested attribute like |
@Birdr518 I am currently working on fix and also feature to work better with therse nested attributes. I hope i will be able to create pull request in next week. |
@House-MD any updates on this? |
@House-MD, is there any place where we can see those changes? |
Currently I fixed it by overriding the entity constructor and manually setting the oldValue and the hasDirtyAttributes property.
This way the @House-MD do you have any updates on your fix? |
Hello @RicardoNeves and @MarkCorneth. I also added nested array/object attributes. I am currently testing this solution for nested attributes. I am not happy with it but after maybe 10 different aproaches but this one seems working. I tried mupltiple solutions with Proxy array/objects but in the end it always had some kind of bug or ended up with infinite loops of getters and apply methods (I still have code to this solution so I will try to finish it but for now this one should be also working. There is one setback -> for nested attributes I had to put their dirtyChecking to method in model -> hasDirtyAttributes which is always called before save and can be triggered by user any time. |
…utes # Conflicts: # package-lock.json # src/models/json-api.model.ts
Hello I have problem with loading data, right after I load them from backend, entity has hasDirtyAttributes:true and on save its sending complete entity back to backend instead of only changed fields. happens for findAll() and find()
list.component.ts
client.resolve.ts
client.routes.ts
client.datastore.ts
The text was updated successfully, but these errors were encountered: