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.
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.
Is there a public API to get the diff of a particular model instance?
I'm currently using
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.