0 Replies Latest reply on Feb 18, 2005 2:52 PM by Mr. M

    Compound primary key mapping to foreign keys error.

    Mr. M Newbie

      Scenario
      The schema of a legacy table has a 3 column primary key. 2 of the columns relate to the FK of table B, and the 3rd key relates to the FK of table C. I have no control over the database design and must map my CMP EJBs as-is.

      The schema is: http://engel.us/ejbmapping/schema.gif

      Problem
      It doesn't appear that JBoss is flexible enough to support my schema. Is JBoss incapable of mapping this relationship? If JBoss can handle it, how do I define the ejb-jar.xml relationships? When JBoss loads my beans, I get this error:

      EJB
      org.jboss.deployment.DeploymentException: Mappings were not provided for all fie
      lds: unmaped fields=[classIndex] in role=x_CLASS_SYM-cmp20-has-x_MASTER_SYMB
      OL-cmp20

      http://engel.us/ejbmapping/stack_dump.txt

      My table relationships are defined as:

      http://engel.us/ejbmapping/ejb-jar.xml
      http://engel.us/ejbmapping/jbosscmp-jdbc.xml

      Thanks,
      Mr. M