クラウド内のバックエンドの変更を追跡したいと考えています。
私の before_save のログは、次のようなことを教えてくれます:
before_save triggered for Elements for user oKwM9mvEUn:
Input: {
"original":
{"elements":[
{"__type":"Pointer","className":"Element","objectId":"VzeuG3Z5N6"},
{"__type":"Pointer","className":"Element","objectId":"APkHJpgcms"},
{"__type":"Pointer","className":"Element","objectId":"xHG1jg8fny"}
]},
"update":
{"elements":[
{"__type":"Pointer","className":"Element","objectId":"VzeuG3Z5N6"},
{"__type":"Pointer","className":"Element","objectId":"xHG1jg8fny"}
]}
}
Result: Update changed to
{"elements":[
{"__type":"Pointer","className":"Element","objectId":"VzeuG3Z5N6"},
{"__type":"Pointer","className":"Element","objectId":"xHG1jg8fny"}
]}
dirtyKeys は、「要素」が変更されたことを示していますが、変更を追跡したいだけなので、追加 (または削除) されたものを正確に知りたいです...
これらの「更新」値にアクセスする可能性はありますか? それとも、別のプロパティで自分で追跡する必要がありますか?
ヒントをありがとう!