Dear all,
i have the following delete record function:
def deleteRecord(self,tableObj):
self.session.delete(tableObj);
self.session.commit();
When i call the abobe function, before commit(), i get the following
traceback:
Traceback (most recent call last):
File "./main.py", line 66, in <module>
main()
File "./main.py", line 53, in main
dbObj.deleteRecord(ddd);
File "/home/mohsen/projects/amlak/dbabslayer/dbabslayer.py", line 86, in
deleteRecord
self.session.delete(tableObj);
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line
1437, in delete
orm_util.state_str(state))
sqlalchemy.exc.InvalidRequestError: Instance '<SellersTable at 0x994a90c>'
is not persisted
dbabslayer class have a set of function such as deleteRecord, addRecord,
createEngine, createSession and so on.
SellersTable is class name of sellers table.
*Where's Problem?*
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.