[sqlalchemy] Re: How to explicit name aliased classes in joins of orm.query

2011-07-05 Thread Michael Tils
: On Jul 4, 2011, at 3:25 PM, Michael Tils wrote: Here is my mapping, this time in german... OK, sifting through lots of extraneous details as well as the lack of the actual table definitions, it seems like you're looking to join from Building-BuildingCondition-Lookup.     I don't use

Aw: Re: [sqlalchemy] Re: How to explicit name aliased classes in joins of orm.query

2011-07-05 Thread Michael Tils
Thanks a lot, I'm happy now :-) -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/JIjX-ysYSVYJ. To post to this group, send email to sqlalchemy@googlegroups.com.

[sqlalchemy] How to explicit name aliased classes in joins of orm.query

2011-07-04 Thread Michael Tils
Hi there, I have a problem to understand how aliased classes are used in orm.query. I have an polymorphic single-inheritance table, which is a lookup table for about 10 other tables. On some of that tables there are more than one column which relates to that table, so they have to be aliased.

Aw: Re: [sqlalchemy] How to explicit name aliased classes in joins of orm.query

2011-07-04 Thread Michael Tils
Hello, thanks for your help. The joins Building.condition and Building.care_level are pointing the same table. The table is a single-inheritance construct. The query: session.query(Building).join(rating, Building.condition).join(care_level, Building.care_level) produces this error:

Aw: Re: Aw: Re: [sqlalchemy] How to explicit name aliased classes in joins of orm.query

2011-07-04 Thread Michael Tils
Here is my mapping, this time in german... Building class: class Lookup(OrmBaseObject): id = 0 lookupCategoryId = 0 category = LookupCategory value = '' properties = { 'lookupCategoryId':tables['lookup'].c.lookup_category_id, 'category':