1 Reply Latest reply on Feb 10, 2003 4:59 PM by Guy Daniel

    xdoclet doesn't include <primkey-field> ???

    Guy Daniel Newbie

      Hey JBoss Newbies,

      Is it normal for xdoclet 1.2b2 not to include the (for eg..) <primkey-field>id</primkey-field> in ejb-jar.xml?

      I've marked the primary key:

      * @ejb.pk-field
      abstract Long getId()

      ... and all the other @ejb tags work for the method.

      I've found a workaround to put it as the first entry in with the finders in ejb-finders-{0}.xml, so It's no big deal, just wondering if there is a better way of doing it?


      Guy Daniel

        • 1. Re: xdoclet doesn't include <primkey-field> ???
          Guy Daniel Newbie

          [Xdoclet-users] gave me the answer (for some reason not known to man I had an @ before the primkey-field tag element at the class level):

          If you want xdoclet to generate a <primkey-field/> element you need to inform it at class level:

          * @ejb.bean
          * primkey-field="id"

          and you don't need to use @ejb.pk-field in the pk getter.

          Thanks to Marcus Brito and Adam Houghton.