Join tag not available at method level
--------------------------------------

         Key: XDP-130
         URL: http://jira.codehaus.org/browse/XDP-130
     Project: XDoclet 2 Plugins
        Type: Bug
  Components: hibernate  
 Environment: Windows XP 2003
 Reporter: Vinayak Chitragar
 Attachments: screenshot-1.jpg

The join tag is not available at the method level. As a result, while 
implementing a One-to-many association using "Table Per Concrete Class" 
strategy, following mapping file cannot be generated.

The class associations and hibernate mappings that works is given below. 
However, as XDoclet2’s tag – hibernate.join – is a class level tag, I am not 
able to generate the hibernate mapping file using XDoclet2.

Class Associations - 

1. P associated with interface X.
2. X is implemented  by classes Z & Z1.
(Screenshot attached)
 
The expected hbm file output for the above two objects should look like the 
following. However the existing XDoclet2 tags do not facilitate this.

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
       "-//Hibernate/Hibernate Mapping DTD//EN"
       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
       <hibernate-mapping package="one2many">              
              <class name="P" table="PTEST">
                     <id name="id" column="P_ID" type="java.lang.Long">
                           <generator class="increment"/>
                     </id>
                     <set name="xs"  table="P_XTEST">
                           <key column="P_ID"/>
                           <many-to-any meta-type="string" id-type="long">
                                  <meta-value value="Z" class="Z"/>
                                  <meta-value value="Z1" class="Z1"/>
                                  <column name="X_CLASSNAME"/>
                                  <column name="X_ID"/>
                           </many-to-any>
                     </set>
              </class>
</hibernate-mapping>

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
       "-//Hibernate/Hibernate Mapping DTD//EN"
       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
       <hibernate-mapping package="one2many">
              <class name="Z1" table="Z1TEST">
                     <id name="id" column="Z1_ID" type="java.lang.Long">
                           <generator class="increment"/>
                     </id>
                     <join table="P_XTEST" inverse="true">
                           <key column="X_ID"/>
                           <many-to-one name="p" column="P_ID"/>
                     </join>
              </class>
</hibernate-mapping>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to