check record exist mongodb async driver java

时间:2018-05-14 17:39:16

标签: java mongodb mongodb-asyc-driver

Im trying to check if record ecist in my single db using mongo async driver but this dosen t seem to work correctly so what is the most efficient way to check record exist using this stack ,

Im doing simple check like :

if(collection.find(new document(..)).limit(0)==null)
then insert in database 

But this dosen t insert any document in the database !!

0 个答案:

没有答案