I have read that it is fixed in the newest beta.

On Thu, Nov 28, 2002 at 11:19:35AM -0800, Andre Selton wrote:
> Hello ,
> 
>   I have 2 cmp beans with a cmr 1-N relationship
> between them.
>   But the problem is the <key-fields> tags are created
> empty on
> jbosscmp-jdbc.xml.
>   I did some search on the list archives and found
> some messages about
> this, but not a solution to the problem.
>   This is the jbosscmp-jdbc.xml file created by
> xdoclet :
> 
> <?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>
>    <defaults>
>      <datasource>java:/PostgresqlDS</datasource>
>     
> <datasource-mapping>PostgreSQL</datasource-mapping>
>    </defaults>
>    <enterprise-beans>
>    ........
>    </enterprise-beans>
>   <relationships>
>     <ejb-relation>
>      
> <ejb-relation-name>Customer-Request</ejb-relation-name>
>       <foreign-key-mapping/>
>       <ejb-relationship-role>
>          
> <ejb-relationship-role-name>Request-has-Customer</ejb-relationship-role-name>
>                   <key-fields/>
>       </ejb-relationship-role>
>       <ejb-relationship-role>
>          
> <ejb-relationship-role-name>Customer-has-Requests</ejb-relationship-role-name>
>                   <key-fields/>
>       </ejb-relationship-role>
>     </ejb-relation>
>   </relationships>
> </jbosscmp-jdbc>
> 
>   Note the "<key-fields/>".
>   
>   The classes are here :
> 
>   ------------------------ CustomerBean
> ----------------------
> /**
>  * @ejb.bean
>  *     name="Customer"
>  *     type="CMP"
>  *     view-type="local"
>  *     jndi-name="Customer"
>  *     cmp-version="2.x"
>  */
> 
> 
> public abstract class CustomerBean implements
> EntityBean {
> 
>         public EntityContext ctx;
> 
> /**
> * @ejb.pk-field
> * @ejb.persistent-field
> * @ejb.interface-method view-type="local"
> */
>         public abstract java.lang.Integer
> getIdCustomer ();
> 
> /**
> * @ejb.interface-method view-type="local"
> */
>         public abstract void
> setIdCustomer(java.lang.Integer id);
> 
> /**
> * @ejb.persistent-field
> * @ejb.interface-method view-type="local"
> */
>         public abstract String getCustomerName();
> 
> /**
> * @ejb.interface-method view-type="local"
> */
>         public abstract void setCustomerName(String
> customerName);
>         
> /**
> * @ejb.relation name="Customer-Request"
> role-name="Customer-has-Requests" 
> * @ejb.interface-method view-type="local"
> * @jboss.relation-mapping style="foreign-key" 
> */
> 
>         public abstract Collection getRequestList();
>         
>         public abstract void setRequestList(Collection
> RequestList);
> 
>         ..........
> 
> }
> 
>   ------------------------ CustomerBean
> ----------------------
>   
>   ------------------------ RequestBean
> ----------------------
> 
> /**
>  * @ejb.bean
>  *     name="Request"
>  *     type="CMP"
>  *     view-type="local"
>  *     jndi-name="Request"
>  *     cmp-version="2.x"
>  */
> 
> 
> public abstract class RequestBean implements
> EntityBean {
> 
>         public EntityContext ctx;
> 
> /**
> * @ejb.pk-field
> * @ejb.persistent-field
> * @ejb.interface-method view-type="local"
> */
>         public abstract java.lang.Integer getIdRequest
> ();
> 
> /**
> * @ejb.interface-method view-type="local"
> */
>         public abstract void
> setIdRequest(java.lang.Integer id);
> 
> /**
> * @ejb.persistent-field
> * @ejb.interface-method view-type="local"
> */
>         public abstract Date getRequestDate();
> 
> /**
> * @ejb.interface-method view-type="local"
> */
>         public abstract void setRequestDate(Date
> RequestDate);
> 
> /**
> * @ejb.relation name="Customer-Request"
> role-name="Request-has-Customer" 
> * @ejb.interface-method view-type="local"
> */
> 
>         public abstract test.CustomerLocal
> getCustomer();
>         
>         public abstract void
> setCustomer(test.CustomerLocal customer);
> 
>         ........
> }
> 
>   ------------------------ RequestBean
> ----------------------
> 
>   Any help ?
> 
>   Andre S.
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T 
> handheld. Power & Color in a compact size! 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user

-- 
MVH
Marius Kotsbak
Boost communications AS


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to