Peter, please note that the DTD for jbosscmp-jdbc.xml has changed. The
example you provided here is invalid according to the new DTD. Take a look
at this post

http://main.jboss.org/forums/thread.jsp?forum=46&thread=12702

in JBoss forums. Here I explained how to write relationships in the new DTD
format. Regarding table mapping, xDoclet will generate a
<relation-table-mapping/> element only if the relation is n-n.

--
Ja ne,
   Pazu [EMAIL PROTECTED]

http://www.animegaiden.com.br

----- Original Message -----
From: "Peter Shillan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Marcus Brito" <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 10:32 AM
Subject: [Xdoclet-user] RE: JBoss Subtask Last Updated?


> Perhaps I was going down the wrong road here... :-)
>
> I want to have a jbosscmp-jdbc.xml file that implements a relationship
without any foreign-key constraints. I want it to use a table to map the
relationships. I want the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd";>
>
> <jbosscmp-jdbc>
>
>   <SNIPPED STUFF HERE...>
>
>   <relationships>
>     <ejb-relation>
>       <ejb-relation-name>parent</ejb-relation-name>
>       <relation-table-mapping>
>         <table-name>forum_message_parent</table-name>
>       </relation-table-mapping>
>     </ejb-relation>
>   </relationships>
>
> </jbosscmp-jdbc>
>
> but I can't see how to get this in xdoclet... what you have may be
correct, but I want to say something like:
>
> /**
>  * @jboss:relation
>  *        fk-constraint="false"
>  *        mapping-table="forum_message_parent"
>  */
>
> because if you have a recursive relationship, you can't use foreign keys
and need to use a table. Is such a facility available?
>
> Thanks,
>
> Peter.


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to