define relations both ways?

From: Tore Halset (halse..vv.ntnu.no)
Date: Fri Nov 28 2003 - 09:31:21 EST

  • Next message: Leonardo R. Nunes: "NullPointerException"

    Hello!

    Take the following relation:

    Person<<-->Gender

    One person has only one gender. Two persons can have the same gender. I am
    never interested in relation from a specific gender to all of the persons
    with that gender.

    Should I define the relation both ways in cayenne? Whould my application
    be faster in any way if i drop the obj-relation from gender to person?
    What about the db-relationship?

    My model is working, but after inserting a person with a gender it looks
    like a huge select are performed. Perhaps cayenne has to do a
    select * from person where genderid=1
    If the inserted person also has a genderid=1? Is it to update the relation
    from gender to person? How can I prevent it from happening.

    It looks strange. Perhaps I am way off :)

     - Tore.



    This archive was generated by hypermail 2.0.0 : Fri Nov 28 2003 - 09:31:28 EST