localbase icon indicating copy to clipboard operation
localbase copied to clipboard

get function returning object instead of array.

Open daniel329paul opened this issue 4 years ago • 3 comments

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);

daniel329paul avatar Oct 26 '21 04:10 daniel329paul

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.

Sandro48 avatar Nov 19 '21 07:11 Sandro48

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.

danny329 avatar Nov 23 '21 10:11 danny329

Same happening here. using await.

HEAVYPOLY avatar Aug 05 '23 19:08 HEAVYPOLY