Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want the Relative complement of two collections in mongoDB say
LocalFile and ServerFile

i have Local FIle
A.txt
B.txt
C.txt

and ServerFiles
A.txt

i want the result
B.txt
C.txt
Posted
Updated 16-Dec-15 1:41am
v3
Comments
glen205 16-Dec-15 7:00am    
Hi,

Sorry I don't have a solution in mongoDB, but it might help you get answers if you change the following:

Your request seems to be "Get all LocalFile which are *NOT* in ServerFiles".
This is not an intersection, this is a "relative complement".

https://en.wikipedia.org/wiki/Venn_diagram
srilekhamenon 16-Dec-15 7:14am    
thanks for correcting me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900