I have an array of entry _id's and would like to access a specific field of each corresponding database entry, and add it to a list. How do i go about reading a field of a database entry using the entry _id?
I have an array of entry _id's and would like to access a specific field of each corresponding database entry, and add it to a list. How do i go about reading a field of a database entry using the entry _id?
Hello Patrick,
You should use pointer type for such purpose https://devcenter.appery.io/documenta...
Does this work with a pointer to a collection in a different database?
Hi Patrick,
Sorry but your question is not fully clear for us.
If you want to get items from DB by it's "_id's" you have two ways to do it:
First(it's recomended to use this way) is "$in" clause:
See details here:
https://devcenter.appery.io/documenta...
Second is "$or" clause:
see details here:
http://devcenter.appery.io/documentat...
Note: you should use one of suggested clauses in the "where" clause.
For example:
1 first way.
pre
//You should replace "20" and "80" values with your stored in your array you have mentioned.
where={"Message_Creater_Id": {"$in": [20,80]}}
/pre
2 second way.
pre
//You should replace "20" and "80" values with your stored in your array you have mentioned.
where={"$or": [{"Message_Creater_Id": "20"},{"Message_Creater_Id": "80"}]}
/pre
Regards.