Skip to content
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

diff public API #93

Open
heartsentwined opened this issue Sep 11, 2013 · 1 comment
Open

diff public API #93

heartsentwined opened this issue Sep 11, 2013 · 1 comment

Comments

@heartsentwined
Copy link
Contributor

Is there a public API to get the diff of a particular model instance?

I'm currently using

# foo is a model instance of App.Foo
diff = foo.diff foo.session.getShadow(foo)
propChanged = !!diff.filterBy('name', 'prop').length

Is this the canonical way of doing so in epf? I understand that it only returns a list of changed properties for now, but that's enough for my use case.

If there is no public API for now and if you like this solution, I can make a PR for it.

@ghempton
Copy link
Contributor

There is not currently a public API. model.diff is still pretty primitive right now. Ideally I would like to pull in a 3rd party diffing library and perform the diff on a raw attribute pojo.

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

No branches or pull requests

2 participants