[SQLObject] Overcoming SQLOBject's non-OO behaviour
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: David M. <da...@re...> - 2004-03-26 23:14:57
|
Hi, While I've got SQLObject now working nicely with my pyweb.gui web framework in CGI mode and standalone server mode, SQLObject's behaviour under mod_apache is giving me some trouble. Even when creating/using whole new connection objects, and using these in completely separate table classes, SQLObject seems to be storing stuff globally, and not keeping all its state info encapsulated within each connection object. IMO, this is very non-OO behaviour - when one creates a new connection object, and uses this object in building table classes, SQLObject's behaviour should be the same regardless of whether any classes accessing the same tables have already been created in the same process. My workaround is to impose a rule on the user, that within any given apache process, no more than one pyweb.gui application may access the same table. But as you can see, this is a pretty unacceptable limitation. Is there any way of causing SQLObject to 'clean its slate' and 'forget everything'? If so, what's the best way? Thanks in advance for your help Cheers David |