Linked Questions

171 votes
7 answers
157k views

I'm sure MongoDB doesn't officially support "joins". What does this mean? Does this mean "We cannot connect two collections(tables) together."? I think if we put the value for _id in collection A to ...
TK.'s user avatar
  • 28.4k
5 votes
1 answer
28k views

I am new to Mongo! Please help me how to do left join in Mongo Sql Statement : Select * from TableA left Join TableB on (TableA.col1 = TableB.col1 AND TableB.col2 = "ABC") Please provide me the ...
0 votes
1 answer
5k views

I want to join two tables in mongoDB. I have table-1) location "_id" : ObjectId("5c0f5d16e32f1fe49e648ac8"), "device_time" : "2018-11-30 10:48:44", "l_created_date" : "2018-11-30 10:49:18"...
2 votes
1 answer
3k views

Given the following collections: Message collection { "_id" : ObjectId("59f76fc3a8e87e411c22d0ac"), "OriginApp" : "App1", "MsgGroupId" : "499", "UserName" : "User1", "Message"...
-2 votes
1 answer
1k views

I have two collection - Call them main and sub. My main collection looks like below, { "_id" : "xxxxx", "subId" : "1234" } And my sub looks something like, { "_id" : "1234", "name" : "...
1 vote
2 answers
1k views

Consider the below image. I have two collection in MongoDB and I want to render the result where just by matching the name it should give me the desired output. My problem is I am unable to ...
2 votes
1 answer
811 views

I have doubt how to map two collection in mongodb using mongoclient.I tried it but its not working.how to solve it group_promotion collection { "_id" : ObjectId("5cf7679a0b0bed2e7483b998"), ...
0 votes
0 answers
711 views

I want to create a migration script that able to copy from Project assignedTo field to Project assignedMultiple but inserted in an array with the users detail on it and assignedTo field will be null. ...
0 votes
3 answers
415 views

I want to write this query with mongodb select * from tab1 a, tab2 c where a.a_id = 2 and c.c_id = 3 and a.a_id = c.c_fk_account_id_created_by I tried this code but didn't get ...
Bouzid ALI's user avatar
0 votes
0 answers
425 views

I have several large collections in a mongo db. some with sizes ~500 MB. (Collections get bigger over time reaching the 500MB in size and bigger) Collection1: 109091 documents ...
1 vote
1 answer
407 views

{ "_id" : ObjectId("5e8dae610b209222e10a0ac4"), "serial" : "2248", "externalId" : "452085", "hierarchyPathByIds" : ",5e2eb1662698a2097c71d855,", "status" : "ACTIVE", } ...
1 vote
0 answers
351 views

Hi guys I have created a cursor in mongo db to find a condition which is shown below var mycursor = db.catalog.find({}) mycursor.forEach(function(x) {if(x.book.find({"publisher":{"$exists":true ,...
0 votes
0 answers
295 views

I don't know when to use ref in schema, but recently I started to use it as it looks clean. Below is a working example. const UserSchema = new Schema({ credit: { type: Schema.Types.ObjectId, ...
0 votes
0 answers
235 views

I've got the following collections: Table1 = { _id, Title } Table2 = { _id, Name } Table3 = { _id, TableType, TableId } I need to do a query to return a result that includes the Title or Name ...
SoftwareGuy74's user avatar
0 votes
0 answers
223 views

I have UserSchema and CreditSchema const UserSchema = new Schema({ credit: { type: Schema.Types.ObjectId, ref: 'Credit' } }) const CreditSchema = new Schema({ userId: Schema.Types....

15 30 50 per page
1
2 3 4 5
...
10