-
1. Re: Explicit Mapping for 1-M Relationship
mattia123 Nov 26, 2002 3:41 AM (in response to erik777)Hi,
it is documented in JBoss.3.0QuickStart.Draft3.pdf section "Relationship Mapping" at page 83.
bye,
mattia -
2. Re: Explicit Mapping for 1-M Relationship
erik777 Nov 26, 2002 5:18 PM (in response to erik777)I read that many times over, and never understood exactly how you syntactically map a foreign key, and the examples do not show you.
I did figure it out though when I read a January post regarding 3.0.0 alpha, using a foreign key tag that is no longer valid in the jbosscmp-jdbc DTD. I had suspected by this point that the key-fields tag had something to do with this, but could not find a valid example, and nothing truly explaining what column-name was truly used for.
I finally realized it might be the placeholder for the foreign key reference when I searched for the dated foreign-key-fields tag in the JBossCMP.pdf, only to find a reference in the Revision History stating that it was somehow merged with the key-fields element, hinting that I should pursue my original hunch. I experimentally tried using the column-name tag, and sure enough, it worked!
Boy was I happy. I spent a whole day trying to figure this one out. I would really love to see the documentation updated to more clearly explain this tag, and the criticalness of using it in a one-to-many, to save others the time and frustration I went through.