[SQLObject] Change to Converters.py breaks selects
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Edmund L. <el...@in...> - 2003-07-21 20:09:18
|
The changes to Converter.py to refactor it has broken operations on the results of select operations involving queries... Example: >>> p = Person.select(Person.q.id == 1) >>> p <SQLObject.SQLObject.SelectResults object at 0x816960c> >>> len(p) Traceback (most recent call last): File "<stdin>", line 1, in ? File "SQLObject/SQLObject.py", line 1084, in __len__ count = conn.countSelect(self) File "SQLObject/DBConnection.py", line 149, in countSelect q = "SELECT COUNT(*) FROM %s WHERE %s" % \ File "SQLObject/DBConnection.py", line 175, in whereClauseForSelect q = str(select.clause) File "SQLObject/SQLBuilder.py", line 157, in __str__ return self.sqlRepr() File "SQLObject/SQLBuilder.py", line 219, in sqlRepr return "(%s %s %s)" % (sqlRepr(self.expr1), self.op, sqlRepr(self.expr2)) File "SQLObject/Converters.py", line 99, in sqlRepr raise ValueError, "Unknown SQL builtin type: %s for %s" % \ ValueError: Unknown SQL builtin type: <type 'instance'> for co_person.id |