[ http://jira.codehaus.org/browse/XDP-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Pribluda reassigned XDP-213: --------------------------------------- Assignee: Konstantin Pribluda > Support Join tag with subtags including <key>, <property>, <many-to-one>, > <component> > ------------------------------------------------------------------------------------- > > Key: XDP-213 > URL: http://jira.codehaus.org/browse/XDP-213 > Project: XDoclet 2 Plugins > Issue Type: Improvement > Components: hibernate > Affects Versions: 1.0.4 > Reporter: Ryan Ye > Assignee: Konstantin Pribluda > Fix For: 1.0.4 > > Attachments: join-patch.txt > > > This patch can be viewed as a further solution to issue > (http://jira.codehaus.org/browse/XDP-67). > I get the idea from girish sathe. I add a extra attribute "join-name" to > @hibernate.property, @hibernate.many-to-one, @hiberante.component tag, so you > can define @hibernate.join in class level, and its sub element in method and > field level. The following code is the test case I include in this patch. > package org.xdoclet.plugin.hibernate.pojo; > /** > * @author Ryan Ye > * @hibernate.class table="join_parent_table" > * @hibernate.join name="testJoin" table="join_table" > * @hibernate.join-key column="join_key_column" > */ > public class JoinMapping { > /** > * @hibernate.id generator-class="assigned" > */ > public Integer getId(){ > return null; > } > > /** > * @hibernate.property column="join_property_column" > join-name="testJoin" > */ > public String getJoinProperty(){ > return null; > } > > /** > * @hibernate.many-to-one column="join_foreign_key_column" > join-name="testJoin" > */ > public Simple getManyToOne() { > return null; > } > } > this java src file will generate, > <?xml version="1.0" encoding="ISO-8859-1"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD > 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > <hibernate-mapping> > <class table="join_parent_table" > name="org.xdoclet.plugin.hibernate.pojo.JoinMapping"> > <id access="property" name="id"> > <generator class="assigned"/> > </id> > <join table="join_table"> > <key column="join_key_column"/> > <property name="joinProperty" access="property" > column="join_property_column"/> > <many-to-one column="join_foreign_key_column" access="property" > name="manyToOne"/> > </join> > </class> > </hibernate-mapping> > To make this patch work, > 1. you should first download patch_new.txt at > http://jira.codehaus.org/browse/XDP-67. > 2. Next goto http://jira.codehaus.org/browse/XDP-150, that patch is about > method="access" issure of hibernate3.0. > If you don't patch that one, JoinTestCase won't be passed. Or, you can > manually change access = "property" to access ="method" in > JoinMapping.hbm.xml. > 3. patch join_patch.txt > Gook Luck to all ! -- 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ xdoclet-plugins-interest mailing list xdoclet-plugins-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest