Struggling making a many to many

From: Roja Buck (roj..abuck.com)
Date: Tue Mar 27 2007 - 20:58:07 EDT

  • Next message: Anthony Roja Buck: "Re: Struggling making a many to many"

    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



    This archive was generated by hypermail 2.0.0 : Tue Mar 27 2007 - 20:58:41 EDT