Delete a record using Mongo Query DB Tool


Facing issue in delete call using mongo query db tool. When we try to delete using db.collectionName.remove is not possible as it accepts request only json.
Please share the possible way to delete the record in mongo


  • benken_parasoftbenken_parasoft Posts: 399 ✭✭✭

    As its name suggests, the "MongoDB Query Tool" is query-only. It fetches the collection with the name provided in the Collection field and will perform a "find" on the collection based on the provided query and projection arguments. No other operations on the collection are supported including things like "drop", "delete", "insert", or "update".

  • Same set of querying right? Why not it can be used for delete?

  • benken_parasoftbenken_parasoft Posts: 399 ✭✭✭

    The tool only support the "find" operation which can only query documents from a collection object. If the "MongoDB Query Tool" was ever enhanced to perform more then just queries then we'd probably have to rename it to just "MongoDB Tool" (or something). :)

    If needed, you can use the MongoDB java API from an Extension Tool to perform whatever you need, including non-query operations. See their quick start which has code examples.

  • Sure.. is there anyway in near future parsoft team add this to the tool?

  • benken_parasoftbenken_parasoft Posts: 399 ✭✭✭

    is there anyway in near future parsoft team add this to the tool?

    You would need to discuss with your technical representative from Parasoft.

  • Sure Thanks Let my soa team know this.

Sign In or Register to comment.