7 messages in org.apache.db.ojb-userRe: Collection + foreignkey missing
FromSent OnAttachments
BOUESSAY ChristianSep 22, 2004 1:29 am 
Thomas DudziakSep 22, 2004 2:01 am 
Thomas ParadiesSep 22, 2004 2:06 am 
Christian PeschOct 18, 2004 1:42 am 
Thomas DudziakOct 18, 2004 5:15 am 
Christian PeschOct 18, 2004 5:39 am 
Thomas DudziakOct 18, 2004 7:40 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Collection + foreignkey missingActions...
From:Thomas Dudziak (tom@first.fhg.de)
Date:Oct 18, 2004 5:15:47 am
List:org.apache.db.ojb-user

Christian Pesch wrote:

Could you explain, where the complexity comes from? The requirement to define foreign keys on the database schema seems reasonable to me. At least, I've copied the schema definition in my application and added foreign key constraints to it.

Maybe one could take some assumptions and eliminate the need for a manual step in a simple setup without redirection tables and inheritance and ...?

The problem comes from the necessity to analyze whether a foreignkey can be placed safely or not. For instance, you cannot define a foreignkey constraint upon an indirection table if this table is used by a normal class descriptor as well. It can get even more complex if you have inheritance for one end of the collection, say via super-references (which is only implicit in the repository). Implementing this analysis therefore requires determining what cases can possibly arise and then quite some implementation work (esp. unit tests).

Tom