firestore array-contains仅适用于字符串而不是object

yog*_*kre 6 javascript firebase google-cloud-firestore

this.afs
      .collection('userroutes' + cityid, ref =>
        ref.where(
          'requestList',
          'array-contains',
          'str'
        )
      )
      .valueChanges()
      .subscribe(data => {
        //I get the data
        //this works
      });`
Run Code Online (Sandbox Code Playgroud)

不工作

this.afs
  .collection('userroutes' + cityid, ref =>
    ref.where(
      'requestList.id',  <-- in case of object search what it will
      'array-contains',
      'ED8r2DWAcyM0sKJiAJxwwAVDm2q2'
    )
  )
  .valueChanges()
  .subscribe(data => {
    //this do not give any data....
    //though this id is present id firebase db
  });
Run Code Online (Sandbox Code Playgroud)

不工作

this.afs
  .collection('userroutes' + cityid, ref =>
    ref.where(
      'requestList',  <-- in case of object search what it will
      'array-contains',
      'ED8r2DWAcyM0sKJiAJxwwAVDm2q2'
    )
  )
  .valueChanges()
  .subscribe(data => {
    //this do not give any data....
    //though this id is present id firebase db
  });
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用firebase 5.3.0中的新功能,它是array-contains; 我看到它只适用于字符串但不适用于对象;

这在字符串的情况下工作正常.