http://qs321.pair.com?node_id=1146026


in reply to Re: MongoDB removing document
in thread MongoDB removing document

just to be clear.. I'm stuck. I did look at that page but haven't been able to find out how to get to a solution by implementing a 'filter expression'.

Replies are listed 'Best First'.
Re^3: MongoDB removing document
by Corion (Patriarch) on Oct 26, 2015 at 19:14 UTC

    I haven't done any work with MongoDB, but I assume from the following:

    # delete a document $coll->delete_one( { name => "John Doe" } );

    ... that you can delete a single document given its ID by using:

    $coll->delete_one( $doc ); # or maybe $coll->delete_one( { _id => $doc->{_id} } );

      Thank you very much for getting back.

      Now I see what you typed it is hard to imagine why I didn't see my mistake in not having $coll as s startpoint to change the collection.

      Happy I can proceed.