1 Reply Latest reply on Feb 6, 2003 6:37 AM by Binder Christian

    No CMR support with JBoss 3.2 get-generated-keys

    Fendy Newbie

      etaData throws a DeploymentException with the
      errormessage "Atleast one role of a foreign-key mapped
      relationship must have key fields" when <primkey-field>
      is missing in ejb-jar.xml.

      I am using 'get-generated-keys' method to use database auto-increment column as the primary key. By requirement, no <primkey-field> cat be inserted in ejb-jar.xml. There is no way to deploy the EJB jar file.

        • 1. Re: No CMR support with JBoss 3.2 get-generated-keys
          Binder Christian Newbie


          I had nearly the same problem. I use an unknown primary key and a key-generator (at the bottom you can see the relevant code). The trick there is to include a <field-name> Element into the <unknown-pk> Element, than you can reference this PK in a relationship :


          I hope this helps.


          <entity-command name="KEY-GEN"