samuk190 / localbase

A Firebase-Style Database ... Offline!
636 stars 84 forks source link

get function returning object instead of array. #61

Closed daniel329paul closed 3 months ago

daniel329paul commented 2 years ago

get function is returning first document in the collection instead of fetching all the documents. query:- db.collection("app_bar").get()

output:- { "bot_name": "Tomato", "bot_icon": "data:image/png;base64,iVBOR", "bot_type": "External" }

Kindly help, what is the reason for this to happen. im using my own custom keys. keys are string.

db.collection('app_bar').doc(e.bot_name).set(e);

Sandro48 commented 2 years ago

I have the exact same problem. When fetching multiple times, it's fetching the collection correctly most of the times, only sometimes it returns the first document of the collection.

danny329 commented 2 years ago

I was facing this issue when using async/await to handle promises on local base. But when I started using .then() i didn't get those issues.

HEAVYPOLY commented 1 year ago

Same happening here. using await.

samuk190 commented 3 months ago

If you have same issue on current release please make another issue.