have you tried not using 0 for a primary key ? i feel like that
might be getting in the way.
On May 18, 2009, at 3:59 PM, fleong wrote:
Sorry for the delay. Yes, i want to reference Table22, the 'correct'
code is as follows, but obtains the same result. Don't understand
because not run
0 in a numerical primary key.. excuse if it is obvious, but: what's
wrong? :/ I've tried and nothing.. when ask for instances that are
linked through 't22' get all instances of 'Table2'. There must be
something in the relationships configuration involving the entire
table.. can it be?
On 18
try taking a look at your SQL output. the issue is pretty obvious,
the join condition between your two tables is insufficient to get a
T22 row. table_2.id has two rows with 0 for the id column, so
joining from table_2 to table_22 on just id gives you two rows. it
has nothing to do with
the foreign key between table2 and their children was wrong.. now
works correctly.
Thanks for your help!
greetings,
Fernando
table_21 = \
Table(
'table_21', metadata,
Column('id2', Integer, primary_key = True),
Column('info', String),