This content has been marked as final.
Show 4 replies
-
1. Re: Atleast one role of a foreign-key mapped relationship mu
j_sorin Jul 2, 2003 8:55 AM (in response to j_sorin)"j_sorin" wrote:
"j_sorin" wrote:
"j_sorin" wrote:
Why if I used in ejb-jar.xml instead of my defined primary key class a java standard class the error message is not displayed anymore ? -
2. Re: Atleast one role of a foreign-key mapped relationship mu
oscpro Aug 7, 2003 9:55 AM (in response to j_sorin)"oscpro" wrote:
"oscpro" wrote:
I have the same problem.
Did you find a solution besides using java classes as primary keys?
Oscar -
3. Re: Atleast one role of a foreign-key mapped relationship mu
oscpro Aug 7, 2003 1:20 PM (in response to j_sorin)"oscpro" wrote:
"oscpro" wrote:
"oscpro" wrote:
Hi,
I found a solution. In jbosscmp-jdbd.xml you add:<relationships> ... <ejb-relation> <ejb-relationship-role> <ejb-relationship-role-name>role-name</ejb-relationship-role-name> <key-fields> <key-field> <field-name><!-- include here the name of the primary key field of the other side (ie. id)--></field-name> <column-name><!-- include here the name you want to give to you foreign key column (ie. address_id)--></column-name> </key-field> </key-fields> </ejb-relationship-role> ... </ejb-relation> </relationships>
If you use xdoclet you just add:... * * @jboss.relation * related-pk-field = "id" * fk-column = "adress_id" * ...
-
4. Re: Atleast one role of a foreign-key mapped relationship mu
seng2000 Dec 28, 2003 11:10 PM (in response to j_sorin)"seng2000" wrote:
"seng2000" wrote:
"seng2000" wrote:
by using @jboss.relation, u receive complain.? :)
give
@jboss.target-relation a try. :)