我想知道另一个字段的值,即使这个更新中没有设置该字段,但它是文档的一部分,并且是在过去设置的。这可以使用al契据:简单模式吗?
发布于 2015-07-14 00:32:39
不是的。除非另一个字段包含在修饰符中,否则您必须使用Collection.findOne查找文档并从中获取字段值。
发布于 2016-07-16 14:03:15
例如,您可以简单地使用:
AutoForm.getFieldValue('profileInformation.dateOfBirth');
age: {
type: String,
optional: true,
defaultValue : function(){
return AutoForm.getFieldValue('profileInformation.dateOfBirth');
}
}https://stackoverflow.com/questions/31372698
复制相似问题