1 Reply Latest reply on Nov 29, 2004 6:59 AM by lasitha

    CMR - with composite key

    lameguy

      I'm going over this article on CMR http://technology.amis.nl/blog/index.php?p=90&page=3. The following code demonstrates how XDoclet is used to establish relationship between two entity beans:

       ... other stuff ...
       /**
       *
       *
       * @ejb.interface-method
       *
       * @ejb.relation
       * name="bibliography-may-contain-article”
       * role-name="BibliographyToArticle”
       * cascade-delete="yes”
       * target-cascade-delete="yes”
       * target-role-name="ArticleToBibliography”
       * target-ejb="Article”
       *
       * @jboss.target-relation
       * related-pk-field="publicationID”
       * fk-column="publication_id_fk”
       */
       public abstract ArticleLocal getArticle();
       ... other stuff ...
      


      My question is, "related-pk-field" is a single field primary key, what if my primary key is a composite key?

      Thanks in advance.