Michael Bayer wrote:
well from a dependency point of view these two dumps are identical, so its not a bad dependency sort (whew).

Yeah. I'm very happy it's not an SA problem.
In the bad version, you have two separate instances of a Timesheet object (those numbers in the parenthesis are the Python id() of the object). Id make a random guess that one of them is missing the data it needs.

You might want to try to track down which one of those is which, see why theres two getting created. if your program is simple enough, you might be able to put a module level variable "THIS" which the first Timesheet sets itself to, or if its not None raises an exception. that way the second Timesheet will raise an exception and you can see a stack trace where its being created.

Thanks for your help Michael. I think the problem is with me not cleaning up/initialising the objectstore properly. I think I am getting some stale objects from previous requests.

Is it a good practice to do a objectstore.clear() and objectstore.commit() before and after every web request ? Would this pose any performance problems ? side effects (besides committing anything not yet committed ?)

Thanks.

Huy Do


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to