Repository navigation
Conversation
…ute change has been reverted.
|
Oh yea, here is a fiddle: http://jsfiddle.net/y49ch/34/ |
|
I have encountered this problem too. I think the problem comes from the Consequently, the condition |
|
After digging deeper, I begin to see the workflow. I post it here, maybe it could help... When an attribute value changes, I tried to replace the context.oldValue = get(get(manager, 'record'), context.name);to this: context.oldValue = get(get(manager, 'record'), 'data.attributes.' + context.name);But when the attribute value changes to its initial value, nothing happened because this condition has no The Hope it helps... |
|
Actually, there is no way to find what caused a record to become dirty. The dirtySet is stored in a transaction but the transaction does not know what did change on the record, when it is rollback, it send the record to the state "loaded.materializing" to materialize again the last data received from the server. cc @wycats |
|
@bobbus, that's the conclusion I've come to also. I've spent the last few days learning the ins and outs of ember-data. As far as I can tell, there are really only three ways to make this work.
I don't love any of those options, but that's what I came up with. I would definitely love to hear from one of the core guys on this. |
|
@workmanw |
|
This is getting fixed by #840 |
This was marked as fixed in #221. In fact, I confirmed this to be fixed for @NickFranceschina, but it appears to have since regressed back to broken. Here is a pull request with a test against this issue.
My initial thought was to check in
dirtyRecordsForAttributeChangeagainst thedata.attribute[attributeName]value, though I'm not confident about this. If someone can suggest a proper fix, I'd be happy to pursue it.