[Twisted-Python] enterprise.row and two-way relationships

Justin Ryan justin at gnubian.org
Sat Oct 19 17:21:32 MDT 2002


Hello..

I've been fumbling with twisted.enterprise.row a bit and seem to have
hit a brick wall.. 

I've got a database with the following info:

accounts
contacts

each account can have an arbitrary number of contacts, and any contact
can be connected to an arbitrary number of accounts..

To solve this problem, I've got a 'rel' table which keeps relationships
between account ids and contact ids, so if I want all of the contacts
for account x I simply pull all of the rows out of the 'rel' table whose
accountId is x, and then individually step through them and extract the
contacts with the corresponding accountIds..

I don't think there is a problem with the way I'm doing this, or a
better way to do this (though I'd be tickled if someone could point me a
better way), but in any case there does not seem to be an (obvious) way
to handle this with RowObjects..

Or, to put it better... the row tutorial does not cover this sort of
stuff :)

Thanks in advance for any help!

-Justin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20021019/c8918040/attachment.sig>


More information about the Twisted-Python mailing list