Comment 2 for bug 435962

Revision history for this message
James Henstridge (jamesh) wrote :

I thought a bit more about this problem, and now think the bug resides in the example code rather than Storm itself.

If we were using a database with proper foreign key constraints, to delete the T2 records, the FK would need to go from T2.t1_id to T1.id. Therefore, T1.t2 is a back reference.

If you modify the reference definition to the following, the problem should go away:

    t2 = Reference(id, 'T2.t1_id', on_remote=True)

That seemed to fix the problem in the simplified test case I was working on.