查找具有字段值的对象(这是一个指针)

Find objects with field value (this is a pointer)

我有 class 说 'inspection' 并且有一个字段名称 属性(这是一个指针)。我正在尝试按字段值检索记录,但没有得到任何结果。我正在使用以下代码

getInspectionByProperty = function(req) {
    console.log(req.body.propertyId)
            var query = new Parse.Query("Inspection");
            query.include('property');
            query.equalTo('property', req.body.propertyId);
            query.find({
              success: function(data) {
                    console.log('in success'); 
                    console.log(data);
                // Successfully retrieved the object.
              },
              error: function(error) {
                console.log('in error')
                console.log("Error: " + error.code + " " + error.message);
              }
             });
    };

我在解析日志中收到此错误

Error: 102 pointer field property needs a pointer value

如何获取记录。在此先感谢

这是我尝试过的,对我有用。

getInspectionByProperty = function(req) {
console.log(req.body.propertyId)
        var query = new Parse.Query("Inspection");
        query.include('property');
        query.equalTo("property", {
                    "__type": "Pointer",
                    "className": "Property",
                    "objectId": propertyId
                    });
        query.find({
          success: function(data) {
                console.log('in success'); 
                console.log(data);
            // Successfully retrieved the object.
          },
          error: function(error) {
            console.log('in error')
            console.log("Error: " + error.code + " " + error.message);
          }
         });
};