[jira] Closed: (XDP-130) Join tag not available at method level

"Konstantin Pribluda (JIRA)" <jira-yCVjj/[email protected]>
Newsgroups gmane.comp.java.xdoclet-plugins
Message-ID <45608723.1160138308787.JavaMail.haus-jira@codehaus01.managed.contegix.com>
     [ http://jira.codehaus.org/browse/XDP-130?page=all ]

Konstantin Pribluda closed XDP-130.
-----------------------------------

    Assignee: Konstantin Pribluda

> Join tag not available at method level
> --------------------------------------
>
>                 Key: XDP-130
>                 URL: http://jira.codehaus.org/browse/XDP-130
>             Project: XDoclet 2 Plugins
>          Issue Type: Bug
>          Components: hibernate
>         Environment: Windows XP 2003
>            Reporter: Vinayak Chitragar
>         Assigned To: Konstantin Pribluda
>         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

       

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.