开发者

How to convert such sql query to mongodb query

I need to execute such sql query on mongo(I mean mongo开发者_高级运维db query should be logically equal to the sql). So here is the SQL query:

SELECT * FROM table1 ALIAS1
WHERE 
 field1=1
AND
 field2=2
AND (
  EXISTS(
    SELECT * FROM table2 
    where table2.field33 = ALIAS1.field1
  )
)

Is it possible to do such a query in mongodb in one query?


Use https://github.com/impetus-opensource/Kundera for any such sql like queries. it allows a way to execute JPA queries over mongoDB

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜