[sqlalchemy] Re: names of foreign keys from unknown table/class (short question)

2012-03-27 Thread lars van gemerden
Thanks you Michael (i thought i remembered that the name attribute of the column wasn't set unless explicitely given to the Column constructor, the one thing i didn't check ... ) On Mar 26, 3:55 pm, Michael Bayer mike...@zzzcomputing.com wrote: Column has a collection foreign_keys, a

[sqlalchemy] query with one attribute of table to list

2012-03-27 Thread lestat
If I want get list of id's of table I can get it with z = db.session.query(MyTable.id).all() but it return list like [(7), (13)], but I want like [7, 13]. Now I do it with [x[0] for x in z] Maybe is exists better solution? Thanks -- You received this message because you are subscribed to

[sqlalchemy] strange attributeerror module object has no attribute exc when using sqlalchemy from a mod_wsgi handle

2012-03-27 Thread alonn
this is what I got from tailing the mod_wsgi error stack: [Tue Mar 27 23:14:16 2012] [error] [client 127.0.0.1] from sqlalchemy import create_engine,String,Unicode,Integer, Column, func,distinct, desc [Tue Mar 27 23:14:16 2012] [error] [client 127.0.0.1] File

Re: [sqlalchemy] strange attributeerror module object has no attribute exc when using sqlalchemy from a mod_wsgi handle

2012-03-27 Thread Michael Bayer
sometimes things like that happen when theres a recursion overflow, though I've never seen it occur at module import time like that, save for a bug we've observed in Jython. On Mar 27, 2012, at 5:39 PM, alonn wrote: this is what I got from tailing the mod_wsgi error stack: [Tue Mar 27

[sqlalchemy] After attribute set events

2012-03-27 Thread Rich
Looking for suggestions on a problem I've run into from time to time. I'm trying to use attribute events kindof like database triggers. The only problem is that I only get a before trigger on an attribute event where what I really need is an after trigger. For example: Given two tables,