On 14/02/2006, at 14:21, Stephen Bash wrote:

So I was thinking about this last night after I shut the computer
down...  Since Andrew has a "bidirecitonal" 1:m relation (i.e. a
parent can have many children, a child can have many parents... did I
just make this m:m?) is it better to set up a table with two foreign
keys (to continue the example, parent id and child id) to model that
relation?  From the little reading I've done in relational data
modeling that seems like the most straight forward way to encapsulate
the data in the database, but it may not be most conducive to JDO.

That will work OK for Castor JDO. You should be aware, however, that bidirectional relationships are not well supported for marshalling. See http://jira.codehaus.org/browse/CASTOR-426 and http:// jira.codehaus.org/browse/CASTOR-888

If the foreign key table is the best way, I just need to look up the SQL
command to create that (have I mentioned I've only done a little of
this stuff?), and I need to figure out the correct mapping.

See http://castor.codehaus.org/jdo-mapping.html. The last paragraph should be of particular use for you.

-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to