4 Replies Latest reply on May 2, 2002 3:22 AM by johnprince

    XDoclet and relations

      Hi,

      I've seen a few messages on problems with XDoclet and CMP relations, and I've tried playing around with different versions/dtds, but to no avail.

      The problem is that xdoclet1.1.2 is ignoring @jboss:relation-table and @jboss:relation-mapping tags, but I can't get either the version with JBoss or the latest version from CVS to run (both exit with 'can't find xdoclet.XDocletMain' error messages).

      Anyone else come across/solved this problem?

      John

        • 1. Re: XDoclet and relations

          I am using XDoclet from CVS and it works without any problems. You need to download xjavadoc also. I built xdoclet from the path xdoclet/core/script

          • 2. Re: XDoclet and relations

            Hi,

            > I am using XDoclet from CVS and it works without any
            > problems. You need to download xjavadoc also. I built
            > xdoclet from the path xdoclet/core/script

            The latest CVS? I had already downloaded and added xjavadoc, and built both using the build files. I finally got it working, but it made a mess of the relations - it took the role-name as the target-role-name as well, so I get errors when deploying. Are you using relations in your beans?

            Thanks,

            John

            • 3. Re: XDoclet and relations
              ldoud

              John,

              I'm using XDoclet 1.1.2 without problems for relations. Take a look at the template files, it always uses FK mappings for 1-N relations. The @jboss:relation-table works for M-N relations. Hopefully a future version of XDoclet will allow relation tables for something other than M-N relations.

              Leon

              • 4. Re: XDoclet and relations

                Hi Leon,

                > I'm using XDoclet 1.1.2 without problems for
                > relations. Take a look at the template files, it
                > always uses FK mappings for 1-N relations. The
                > @jboss:relation-table works for M-N relations.
                > Hopefully a future version of XDoclet will allow
                > relation tables for something other than M-N
                > relations.

                Thanks for explaining that - now that I understand that it is intended behavior, I have hacked the template file to do an additional conditional check, so it will generate a relation table tag if @jboss:relation-table table-name="xxx" is present, and it works fine! Saves me doing copy and pastes every time I build.

                John