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

Ken Kennedy kkennedy at abelard.kenzoid.com
Sun Oct 20 17:56:40 EDT 2002


On Sun, Oct 20, 2002 at 02:44:33PM -0500, Justin Ryan wrote:

> > Either way, you should be getting back what you need in one
> > query. Does that make sense?
> > 
> 
> Certainly.., and it's not that far off from what I was doing.. except it
> does seem a bit off in that no info is actually being pulled from the
> account table - and if it were, it would be pulled multiple times (if i
> want to pull the account name and account id, and then a list of
> contacts).
> 
> the big important question here is ('scuse my german)... *drumroll*
> 
> how the fuck do I do this with twisted.enterprise.row? ;)

Ah! Ok...now I'll show my lack of attention. I didn't pay attention to
the twisted.enterprise.ROW reference!

Well...the row stuff looks pretty wonky to me *grin*, but since I want
to understand it as well, we can figure it out together. 

Is the following a good minimalist schema for the objects?

account (
accountid integer,
name varchar(100),
)

contact (
contactid integer,
fname varchar(100),
lname varchar(100),
email varchar(100)
)

rel (
accountid integer,
contactid integer
)

If you've got better field names, just let me know. I just want to be
able to talk apples to apples...

Ken




More information about the Twisted-Python mailing list