[SQLObject] TypeError: unhashable instance using sqlbuilder.Table
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Leandro L. <ll...@gm...> - 2007-01-23 19:47:07
|
Please see bug 1642143[1] for context. I'm moving the discussion in here because it's a little annoying to talk via the tracker ;) [1] https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1642143&group_id=74338 Sender: phd > No need to make SQLExpresshion hashable. You problem must be fixed this > way: > > clauseTables=("task_plan", Plan.sqlmeta.table), > > clauseTables must be a sequence of tables names (strings), not > objects. So, if Table object is not suitable for use with clauseTable, what is it for? The only thing SQLBuilder documentation has, is the Table object, so I thought it was a good idea to use it =) And AFAIS, all that Table object does is to convert itself to a string and or return a Field that all it does is convert itself to a string, so what's the use of Table if is not being an abstraction for a string? =) I don't know, I find cleaner (and pythonic) to use something like: my_table = sqlbuilder.table.a_table clauseTables=(my_table, Plan.sqlmeta.table) than: my_table = sqlbuilder.table.a_table my_table_str = str(my_table) clauseTables=(my_table_str, Plan.sqlmeta.table) because I use my_table to construct other sql expressions. -- LUCA - Leandro Lucarella - Usando Debian GNU/Linux Sid - GNU Generation ------------------------------------------------------------------------ E-Mail / JID: lu...@lu... GPG Fingerprint: D9E1 4545 0F4B 7928 E82C 375D 4B02 0FE0 B08B 4FB2 GPG Key: gpg --keyserver pks.lugmen.org.ar --recv-keys B08B4FB2 ------------------------------------------------------------------------ When I was a child I had a fever My hands felt just like two balloons. Now I've got that feeling once again I can't explain you would not understand This is not how I am. I have become comfortably numb. |