cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roja Buck <r...@fabuck.com>
Subject Struggling making a many to many
Date Wed, 28 Mar 2007 00:58:07 GMT
Hey all,
     I am rather sorry to have to ask this as I am sure that it is utterly
obvious to those in the know, however I am really struggling to get my head
around how to make a many to many relation using the modeller. I have 3
tables:

Address:
ADDRESS_ID
NAME


PhoneNumber:
PHONE_ID
NUMBER

PhoneAddressComposite:
COMPOSITE_ID
PHONE_ID
ADDRESS_ID


Now what I want to do is a simple many to many such that I can go
Address.getNumbers() and I get a list back of all the numbers with that
address's ID from the table PhoneAddressComposite and of course be able to
add additional numbers with ease also. I have struggled to find any step by
step instructions about how to construct such a simple relationship and have
only been able to find this page:

http://cayenne.apache.org/doc20/cayennemodeler-flattened-relationships.html

Which I simply cannot understand, maybe because of the assumed knowledge? I
don't know. I don't suppose anyone has a link to a walkthrough for this
relation? Currently the three tables have no relations what-so-ever attached
to them as no matter what I seem to try, I fail.

Many thanks in advance,

Roja



Mime
View raw message