On Oct 12, 2007, at 2:21 PM, Sean Davis wrote:

> I have two tables:
>
> create table a (
> id serial primary key,
> name varchar(255) unique
> );
>
> create table b (
> id serial primary key,
> subject int references a(id),
> object int references b(id),
> otherinfo varchar(255)
> );
>
> I have been trying to pull ideas together from the self-referential  
> portion of the manual and the many-to-many mapping section, and I  
> haven't figured out how to go about coding this association table  
> and referencing from table a to get subjects and objects of a given  
> member of a.  Is this possible to do?
>

sure..just set "b" as the "secondary" table and set up the  
primaryjoin/secondaryjoin conditions on the relation().


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to