josiahcarlson/rom — pull request #9 by MickeyKim (2013-08-17 03:18:27+00:00)
Title: Update __init__.py

bug : when user delete model object, idx data have revived.

----------usage----------------
someModel.delete()
# at this moment, idx and model object both deleted,
util.session.commit()
# at this moment, model data deleted but idx revived!
----------------------------------------------------

in delete() method, you coded 'session.add(self)'.
I think your intention was that let the user keep tracking model object from session's 'known' memory even the user deleted before call session.commit().
So I suggest line 854's 'cls._gindex.index(..)' should be placed only when 'data' is not empty by line 852. That's why I put one more tab at 854 line.