How can we perform rollback on custom transformed data

后端 未结 2 1178
故里飘歌
故里飘歌 2020-12-22 01:24

I use custom transformation in one of my model like this:

 App.Question = DS.Model.extend({
        questionName: DS.attr(\'string\'),
        parentQuestion         


        
2条回答
  •  天涯浪人
    2020-12-22 02:00

    The transformations don't get applied except on find/save.

    The problem is ED doesn't know how to track your pojo living on your record, so it doesn't show up as a dirty attribute, unless you changed the entire pojo, not just an property on the pojo.

    You might consider making it into some relationship, or non pojo data type

提交回复
热议问题