0 Replies Latest reply on Nov 26, 2002 3:21 AM by Henrik Andersson

    Problem with one-to-one relation

    Henrik Andersson Newbie


      I am trying to make a relation between a class called Person and one called Contactinfo. It compiles fine but at deployment I get this error:

      "Atleast one role of a foreign-key mapped relationship must have key fields:"

      Here's the relation:

      * @return contactinfo of this person
      * @ejb:interface-method view-type="local"
      * @ejb:relation
      * name="person-contactinfo"
      * role-name="one-person-has-one-contactinfo"
      * target-role-name="one-contactinfo-belongs-to-one-person"
      * target-ejb="ContactInfo"
      * target-multiple="no"
      * @jboss:target-relation related-pk field="contactinfo_id"
      * fk-column="contactinfo_id_fk"

      I'm running JBoss 3.0.4 and XDoclet 1.1.2

      Any help appreciated. Thank you.