[sqlalchemy] Re: column_descriptions on recursive query : AttributeError: 'CTE' object has no attribute 'entity'

2015-04-30 Thread g
Hi The error appears if I do not specify the column name. e.g q = session.query(included_parts) print q.all() print q.column_descriptions included_parts = session.query( Part.sub_part, Part.part, Part.quantity).\

[sqlalchemy] Can I run code when an object is added to a certain relationship?

2015-04-30 Thread Adrian
I have a User model with an association proxy referencing the Email model, so I can access the user's email via user.email. Since I'm soft-deleting users and require emails for non-deleted users to be unique, I have a unique constraint on my email table with a `WHERE not is_user_deleted`. In

[sqlalchemy] Re: Can I run code when an object is added to a certain relationship?

2015-04-30 Thread Adrian
Nevermind. I had to use `set` instead of `append` in the attribute event. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com.

[sqlalchemy] Does anyone know how to handle NoSuchColumnError

2015-04-30 Thread Ofir Herzas
Hi, I'm using sqlalchemy 0.9.7 and cx_oracle 5.1.3 and every once in a while (inconsistent), I get the following error: Traceback (most recent call last): File /opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py, line 1919, in flush self._flush(objects)

Re: [sqlalchemy] Re: column_descriptions on recursive query : AttributeError: 'CTE' object has no attribute 'entity'

2015-04-30 Thread Mike Bayer
On 4/30/15 4:02 AM, g wrote: Hi The error appears if I do not specify the column name. thanks very much! this issue was actually set to go out in 0.9.10 as well, but is now fixed. see https://bitbucket.org/zzzeek/sqlalchemy/issue/3403/0910-10-regression-re-column_descriptions e.g q

[sqlalchemy] SQLAlchemy 1.0.3 Released

2015-04-30 Thread Mike Bayer
SQLAlchemy release 1.0.3 is now available. Release 1.0.3 is the latest in a series of weekly releases intended to quickly address remaining small regressions that have come up since the 1.0.0 release. One fairly serious unit-of-work regression regarding SQL expressions is fixed, the new

Re: [sqlalchemy] prototyping a complex query?

2015-04-30 Thread Jonathan Vanasco
I'll try the selectable. That's a good idea. This won't work as a view -- it'll run too slow. It could be a view of a function, but then it's not really prototyping. I'm trying to figure out an interim solution on the SqlAlchemy side. Right now I'm using some custom objects that

Re: [sqlalchemy] Does anyone know how to handle NoSuchColumnError

2015-04-30 Thread Mike Bayer
On 4/30/15 11:00 AM, Ofir Herzas wrote: Hi, I'm using sqlalchemy 0.9.7 and cx_oracle 5.1.3 and every once in a while (inconsistent), I get the following error: Traceback (most recent call last): File /opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py,