[sqlalchemy] Re: M:N select

2009-04-30 Thread Tomáš Drenčák
I found out the solution by explicitly adding join condition: eq1 = ad_equipment_table.alias() eq2 = ad_equipment_table.alias() e1 = equipment_table.alias() e2 = equipment_table.alias() ad_table.join(eq1, join_condition(ad_table, eq1)).join(e1, join_condition(eq1, e1)).join(eq2,

[sqlalchemy] Re: puzzling outerjoin in the mapper

2009-04-30 Thread sandro dentella
Thanks. I do appreciate that this will become the default as I think that if you ask for an outer join that's what you expect. thanks again for you time sandro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: 0.5.3 ORM, MSSQL and FreeTDS: Invalid Cursor State exception?

2009-04-30 Thread Tom Wood
Hi Lucas, I don't think #1350 applies here, but just in case, I pass-ed out the mssql dialect do_begin per the suggestion in the discussion thread referenced by that ticket: no impact on the invalid cursor state exception. -Tom Can you read over this ticket and see if maybe you are

[sqlalchemy] Re: 0.5.3 ORM, MSSQL and FreeTDS: Invalid Cursor State exception?

2009-04-30 Thread Lukasz Szybalski
On Thu, Apr 30, 2009 at 8:36 AM, Tom Wood thomas.a.w...@gmail.com wrote: Hi Lucas, I don't think #1350 applies here, but just in case, I pass-ed out the mssql dialect do_begin per the suggestion in the discussion thread referenced by that ticket: no impact on the invalid cursor state

[sqlalchemy] best way to force upper case on a column

2009-04-30 Thread Sneaky Wombat
What's the best way to force upper case on a column? I see the following in the tutorial/documentation... class MyClass(Base): __tablename__ = 'sometable' name = Column('name', String) @comparable_using(MyUpperCaseComparator) @property def uc_name(self): return

[sqlalchemy] Re: InvalidRequestError: The transaction is inactive due to a rollback... using sqlite with multiple commits.

2009-04-30 Thread Daniel
Hello Michael, Thank you for your replies. I've just tried to create a testcase but proven to myself that it does raise an exception. I'll go back and double check where I might be catching and passing on the exception. Daniel On Apr 29, 3:19 pm, Michael Bayer mike...@zzzcomputing.com wrote:

[sqlalchemy] Re: best way to force upper case on a column

2009-04-30 Thread Michael Bayer
the @validates decorator will modify values on the way in: http://www.sqlalchemy.org/docs/05/mappers.html#simple-validators if you're looking for upper case at the SQL expression level then you need to build a comparator. but you can send that to column_property: name =

[sqlalchemy] Re: 0.5.3 ORM, MSSQL and FreeTDS: Invalid Cursor State exception?

2009-04-30 Thread mtrier
On Apr 29, 10:08 am, Tom Wood thomas.a.w...@gmail.com wrote: Some additional info, and a possible fix: === --- lib/sqlalchemy/databases/mssql.py   (revision 5930) +++ lib/sqlalchemy/databases/mssql.py   (working copy) @@

[sqlalchemy] Re: 0.5.3 ORM, MSSQL and FreeTDS: Invalid Cursor State exception?

2009-04-30 Thread mtrier
On Apr 30, 11:04 pm, mtrier mtr...@gmail.com wrote: Some additional info, and a possible fix: === --- lib/sqlalchemy/databases/mssql.py   (revision 5930) +++ lib/sqlalchemy/databases/mssql.py   (working copy) @@ -991,7