Permalink
Browse files

adding delete method

git-svn-id: http://mongodb-morph.googlecode.com/svn/trunk@132 406649b4-5d4b-11de-8abc-d1c337b90d21
  • Loading branch information...
1 parent a9f27ec commit f5e81d0558650dd6f428f37f0081484f3f1a7ce0 XirisR committed Mar 2, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 mongodb-morph/src/Morph/Object.php
@@ -250,6 +250,15 @@ public function findOneByQuery(Morph_Query $query)
return Morph_Storage::instance()->findOneByQuery($this, $query);
}
+ /**
+ * Deletes this object from the database
+ *
+ * @return boolean
+ */
+ public function delete()
+ {
+ return Morph_Storage::instance()->delete($this);
+ }
// ***************** //
// UTILITY FUNCTIONS //

0 comments on commit f5e81d0

Please sign in to comment.