可以在Parse Cloud Code AfterSave中获取对象的先前值吗? [英] Possible to get previous value of object in Parse Cloud Code AfterSave?

查看:67
本文介绍了可以在Parse Cloud Code AfterSave中获取对象的先前值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 AfterSave 函数,它根据刚刚保存的对象的先前值更新其他内容。只知道对象已经用 object.existed()更改是不够的。

I have an AfterSave function that updates something else based on the previous value of the object that was just saved. Simply knowing that the object has changed with object.existed() is not enough.

有没有办法获取对象属性的先前值,而无需实施昂贵的解决方法并增加API调用的数量?

Is there any way to get the previous value of an object's property without implementing a costly workaround and increasing the number of API calls?

是否可以获取对象的先前值 AfterSave 功能?

Is it even possible to get the previous value of an object in the AfterSave function?

当我调用 object.previous(value),我得到一个未定义的值。

When I call object.previous("value"), I get an undefined value.

推荐答案

不知道这是否有用或是否有用考虑到变通方法成本过高,但您可以向正在更新的对象添加一列,以存储原始列的先前值。这将允许您访问 AfterSave 函数中的先前值。

Don't know if this is helpful or if it would be considered too costly of a workaround, but you could add a column to the object that is being updated that stores the previous value of the original column. This would allow you to access the previous value in the AfterSave function.

这篇关于可以在Parse Cloud Code AfterSave中获取对象的先前值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆