spohlenz/mongomodel

Should the delete method be public

Closed this issue · 1 comments

The delete instance method in persistence is public. Calling this would bypass :destroy callbacks and could lead to some data integrity issues. I would think delete should be private. Or am I missing something?

#delete is public in ActiveRecord so I've kept it the same for consistency. I don't think it hurts to leave it public, although the consequences of delete/destroy should definitely be clearly documented.