Collection:
Room
{
"_id" : ObjectId("6461eb7c1cefe2b485d4ca2e"),
"AgentId" : "5e7a1caaa08a49ff4d029bbd",
"roomName" : "My Room101",
"note" : "note abc",
"roomStatus" : "Empty",
"roomTypeId" : "6461db161cefe2b485d4ca1e",
"createdBy" : "Super Administrator",
"createdAt" : ISODate("2023-05-15T08:00:00.000+0000"),
"updatedBy" : "Super Administrator",
"updatedAt" : ISODate("2023-05-15T08:00:00.000+0000"),
"isDeleted" : false
}
RoomType
{
"_id" : ObjectId("6461db161cefe2b485d4ca1e"),
"roomTypeName" : "VIP 1",
"note" : "note xyz",
"createdBy" : "Super Administrator",
"createdAt" : ISODate("2023-05-15T08:00:00.000+0000"),
"updatedBy" : "Super Administrator",
"updatedAt" : ISODate("2023-05-15T08:00:00.000+0000"),
"isDeleted" : false
}
in SQL:
select * from Room r inner join RoomType rt on r.roomTypeId=rt._id
I want to display query result using Query in Java