flamelink / flamelink-js-sdk

🦊 Official Flamelink JavaScript SDK for both the Firebase Realtime database and Cloud Firestore
https://flamelink.github.io/flamelink-js-sdk
MIT License
43 stars 5 forks source link

filtering by id not working #149

Closed jjost-byte closed 3 years ago

jjost-byte commented 4 years ago

Hi, I am currently using version 1.0.0-alpha.31 of the sdk and have trouble getting data from a schema. I would like to use something like this:

app.content.get({ schemaKey: "schemaName", populate: true, fields: ["id", "title", "subTitle"], filters: [["id", "in", arrayOfIds]] })

but only get 'null'. using

db .collection("fl_content") .where("id", "in", user.favorites) .get()

to directly acces the firestore works.

any advice on this?

gitdubz commented 3 years ago

Hi @jjost-byte,

Can you perhaps share what arrayOfIds is example ["123asd123", "asd123"] or [documentRef, documentRef] etc.

PS: I am moving this to the flamelink-js-sdk repository

gitdubz commented 3 years ago

@jjost-byte are you still having trouble with this?

gitdubz commented 3 years ago

Closing this due to inactivity and unable to replicate.

Using

await result = app.content.get({ 
   schemaKey: "posts", 
   fields: ["title"], 
   filters: [["title", "in", ["Exists", "DoesNotExist"] ]] 
 })

returns with an entry found.