[SQL-CVS] [ sqlobject-Bugs-2417338 ] _connection ignored if sqlhub.processConnection set before
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: SourceForge.net <no...@so...> - 2008-12-11 15:02:49
|
Bugs item #2417338, was opened at 2008-12-11 17:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2417338&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Lucian Stanescu (luci_stanescu) Assigned to: Nobody/Anonymous (nobody) Summary: _connection ignored if sqlhub.processConnection set before Initial Comment: If sqlhub.processConnection is set before a subclass of SQLObject is defined, then the _connection attribute of the new class will be ignored. This is, as far as I could find out, because of: sqlobject/main.py:768 if connection and not hasattr(cls, '_connection'): cls.setConnection(connection) This creates a lot of confusion and, if I understood correctly, is not the intended behaviour either (citing from the documentation): "If you have defined sqlhub.processConnection then this attribute can be omitted from your class and the sqlhub will be used instead. If you have several classes using the same connection that might be an advantage, besides saving a lot of typing." ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2417338&group_id=74338 |