On Feb 15, 2007, at 10:41 AM, svilen wrote:
> heh, i don't have a vague idea what it should be. because you dont want to learn SQL. but if youre really trying to write a one-person system on the scale of complexity of SAP, which usually have...i dunno, several hundred developers for many years ? i think youre gonna have to. > i see at web that what i'm describing is called self-join. > So basicaly, self-referential/self-joining queries cannot be done in > SA? did I say that ? > worse, it can be more than 2 level, e.g. > give those persons which persons.friend.friend.friend.name == 'pipi' the only query that SA explicitly says "no" to is a self-referential eager load. the rest, it will try and see how far it gets. all ORMs require you to hand-code queries for criterions that are too complicated. > >> On Feb 15, 9:41 am, svilen <[EMAIL PROTECTED]> wrote: >>> and, how u make the (3) or (4) work? >>> aliasing the table.column in the comparison does not help.. it >>> should be aliased somehow inside the join also.. >>> >>> Here a simpler case, without the inheritance. >>> 3 and 4 do not work here too - one does exception, other return >>> nothing. >>> >>> maybe express the query in another way? how? >>> >>> ciao >>> svil >>> >>>> taking a look, i think what you should do is use an alias of >>>> the table_Employee in your queries. since the engineer mapper >>>> is using joined table inheritance, the default table_Employee >>>> is already going to be involved in the query, so your external >>>> join condition needs to be off a distinct alias of it to >>>> prevent mixups. >>> >>> query-self-ref.py >>> 2KDownload >> >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---