Skip to content

Added support for detecting change in objects with relations in nested-dirty.js #342

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ldeboer
Copy link

@ldeboer ldeboer commented Oct 24, 2015

This update enabled nested-dirty to detect changes of BelongsTo relations. For example, let's say I had an object with a location attribute that links to another model via BelongsTo, and I change the object in the location attribute to a different location object. Before this change would go unnoticed because related objects were skipped over when creating the $cmStatus. However, now, it saves the $pk of related objects to the $cmStatus, so it would now be able to detect that the location value changed (based on looking at the previous vs new location $pk).

…d-dirty.js

This update enabled nested-dirty to detect changes of BelongsTo relations.  For example, let's say I had an object with a `location` attribute that links to another model via BelongsTo, and I change the object in the `location` attribute to a different location object.  Before this change would go unnoticed because related objects were skipped over when creating the $cmStatus.  However, now, it saves the $pk of related objects to the $cmStatus, so it would now be able to detect that the `location` value changed (based on looking at the previous vs new location $pk).
@jpulec
Copy link
Contributor

jpulec commented Sep 26, 2016

@ldeboer This PR is quite old and out of date. Do you still have any interest in getting it included?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants