使用_id NaN从mongodb中删除文档

时间:2016-07-09 11:41:26

标签: mongodb express

_id等于NaN时,我无法使用 Mongo Express 从MongoDB中删除文档。 enter image description here

按下BIN按钮后,显示:

  

找不到文件!

如何从 Mongo Express 管理它?

1 个答案:

答案 0 :(得分:1)

考虑到url和dateUpsertFromFile不为空,我相信该文档确实存在于数据库中。也许数据绑定不正确?您可以Console.WriteLine("Enter something"); //this will print the text to the screen string inputText = Console.ReadLine(); // Get string from the input and assign it to the inputText variable 删除它,但我之前的观点是立场。你应该能够在某个地方找到// Here, thisActivity is the current activity if (ContextCompat.checkSelfPermission(thisActivity, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) { // Should we show an explanation? if (ActivityCompat.shouldShowRequestPermissionRationale(thisActivity, Manifest.permission.READ_CONTACTS)) { // Show an expanation to the user *asynchronously* -- don't block // this thread waiting for the user's response! After the user // sees the explanation, try again to request the permission. } else { // No explanation needed, we can request the permission. ActivityCompat.requestPermissions(thisActivity, new String[]{Manifest.permission.READ_CONTACTS}, MY_PERMISSIONS_REQUEST_READ_CONTACTS); // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an // app-defined int constant. The callback method gets the // result of the request. } }