Mongo模板剩余的两个查询之间加入

发布于 2025-01-26 17:42:00 字数 676 浏览 2 评论 0原文

在一个春季项目中,我将反应性 mongodb与mongo Template一起返回类型报告类的结果。

    var res1 = (Flux<Report>) template.find(query1, ReportFactory.getReport(reportType).getClass());

    var res2 = (Flux<Report>) template.find(query2, ReportFactory.getReport(reportType).getClass());

我想要一种使用Mongo模板在不使用Java的情况下找到两个结果之间的左联接的方法。 例如:

如果res1 = {rep1,rep2,rep3] and:res2 = {rep2,rep5}

它们之间的左键应为 rep2

In a spring project, I'm using reactive mongodb with mongo template to return a result of type Report class.

    var res1 = (Flux<Report>) template.find(query1, ReportFactory.getReport(reportType).getClass());

    var res2 = (Flux<Report>) template.find(query2, ReportFactory.getReport(reportType).getClass());

I want a way to find the left join between two result using mongo template without using java.
For example:

if res1 = {Rep1,Rep2,Rep3]and: res2 = {Rep2,Rep5}

the left join between them should be Rep2

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文