Morten, see if this paper helps answer your question:

http://users.sdsc.edu/~whedley/ejb/object_relational_mapping_in_orion.pdf

Good luck!

Gordon.

----- Original Message -----
From: "Morten Wilken" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Sunday, December 30, 2001 5:51 AM
Subject: design question: one to many relationship


> i have a design question for the list:
>
> i have a situation where i have some persons that each owns a number of
> games... each game has only one owner.
>
> using orions OR mapping features i have put a collection of games in each
> personbean. This creates a many-to-many table with a personid and a
gameid.
> My database design knowledge tells me this is wrong, and that what i need
is
> a foreign key to the person table in the game table.
> also, i would like to be able to both see what games a person owns, and
who
> owns a certain game. i cant seem to do that without creating redundant
data
> in the database... i would like to think i could make a sensible ejblayer
on
> a sensible database design.
>
> So in conclusion: how do i make this one-to-many relationship so i can
read
> it both ways without creating redundant data, and without making a
> many-to-many table between the person and the game table?
>
> hope any of this makes any sense
>
> sincerely
> Morten Wilken
>
>
>
>



Reply via email to