[sqlalchemy] Re: Nested joins duplication

2010-08-11 Thread Michael Brickenstein
Hi Mike! Thank you very much for your help. It hasn indeed solved my problem. On Aug 10, 4:23 pm, Michael Bayer mike...@zzzcomputing.com wrote: query=session.query(Address) query=query.join((User, Address.user)) query=query.join((Group, User.group)) Yes, and I indeed need this form to

[sqlalchemy] Re: Nested joins duplication

2010-08-11 Thread Michael Brickenstein
just for the typo It hasn indeed  solved my problem. It has solved my problem. Everything works fine now :-). Cheers, Michael -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To

Re: [sqlalchemy] Re: using set returning function in a relationship

2010-08-11 Thread Michael Bayer
On Aug 10, 2010, at 11:20 PM, botz wrote: oops, didn't mean to submit that quite yet. crazy dog... anyways, given that I have foo_props() which acts as a kind of from- clause as in select * from foo_props( 123); I'd like to use that in relationship to a Foo class i.e. mapper(

[sqlalchemy] polymorphic_on a join leads to incorrect collection

2010-08-11 Thread Ross Vandegrift
Hey everyone, I *think* this is a limitation of having classes that are polymorphic_on a join (instead of mapping a join), but I'm going to ask anyway to make sure I understand. I have a hierarchy of mappers to represent various network interfaces on various devices. This is polymorphic_on a

Re: [sqlalchemy] polymorphic_on a join leads to incorrect collection

2010-08-11 Thread Michael Bayer
On Aug 11, 2010, at 10:51 AM, Ross Vandegrift wrote: Hey everyone, I *think* this is a limitation of having classes that are polymorphic_on a join (instead of mapping a join), but I'm going to ask anyway to make sure I understand. I have a hierarchy of mappers to represent various

[sqlalchemy] Re: using set returning function in a relationship

2010-08-11 Thread botz
Thanks for that... I didn't manage to get it to work straight off, but it seems like I'm close. Tried a couple things just to force it to behave as I wanted. # defined the selectable selectable = select( [ sql.column( 'x' ), sql.column('y')], from_obj = [

[sqlalchemy] Re: using set returning function in a relationship

2010-08-11 Thread botz
And really if I could just plug in the argument for the foo_props call, at least in this case it would remove the need for the foreign key altogether as the join is really handled by the semantics of the foo_props call, which happens to only return the one related row. I suppose this could all be

Re: [sqlalchemy] Re: using set returning function in a relationship

2010-08-11 Thread Michael Bayer
On Aug 11, 2010, at 1:19 PM, botz wrote: Thanks for that... I didn't manage to get it to work straight off, but it seems like I'm close. Tried a couple things just to force it to behave as I wanted. # defined the selectable selectable = select( [ sql.column( 'x' ), sql.column('y')],

Re: [sqlalchemy] Re: using set returning function in a relationship

2010-08-11 Thread Michael Bayer
On Aug 11, 2010, at 1:55 PM, Michael Bayer wrote: What is implied by relationship() is that you're joining and limiting a full set of records using a join condition. This implies that the mapped selectable would be returning a set of rows corresponding to all possible child