3
table1
有一个字段字符串“价值”和table2
有一个领域的“价值”为ObjectId
,是否有可能做这样或如何查询写
table1.aggregate([
{
$lookup: {
from: "table2",
localField: "value",
foreignField: "_id",
as: "test"
}
}
])
是有可能暂时字符串转换反对c hecking – arunraj414
可以访问此链接http://stackoverflow.com/questions/4973095/mongodb-how-to-change-the-type-of-a-field –