<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: XDoclet Hibernate &#8220;joined-subclass&#8221; tags don&#8217;t work.</title>
	<atom:link href="http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/</link>
	<description>A continuing account of my life...</description>
	<lastBuildDate>Wed, 21 Apr 2010 15:08:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Ashish</title>
		<link>http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/comment-page-1/#comment-46</link>
		<dc:creator>Ashish</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.murraywilliams.com/wp/?p=55#comment-46</guid>
		<description>Manual entry works with XDoclet 1.2.2. 
Autocomplete can be achieved by declaring a xdoclet template in JBoss IDE.</description>
		<content:encoded><![CDATA[<p>Manual entry works with XDoclet 1.2.2.<br />
Autocomplete can be achieved by declaring a xdoclet template in JBoss IDE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikhil Gupte</title>
		<link>http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/comment-page-1/#comment-47</link>
		<dc:creator>Nikhil Gupte</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.murraywilliams.com/wp/?p=55#comment-47</guid>
		<description>Thanks a lot for this article...
This has been a really frustrating issue.
I have spent the last day trying everything!
Tried xdoclet 1.3 (CVS) that didn&#039;t work...
Tried xdoclet2 - that sux big time... it is no where in the vicinity of bieng considered as usable s/w.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this article&#8230;<br />
This has been a really frustrating issue.<br />
I have spent the last day trying everything!<br />
Tried xdoclet 1.3 (CVS) that didn&#8217;t work&#8230;<br />
Tried xdoclet2 &#8211; that sux big time&#8230; it is no where in the vicinity of bieng considered as usable s/w.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Osten</title>
		<link>http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/comment-page-1/#comment-48</link>
		<dc:creator>Osten</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.murraywilliams.com/wp/?p=55#comment-48</guid>
		<description>I guess it must be implemented since it works for me...

Below is an example.

The parent class:

----
import java.io.Serializable;
import java.math.BigDecimal;

/** 
 * @hibernate.class
 *     table=&quot;ANIMAL&quot;
 */
public class Animal implements Serializable {
    private BigDecimal myId;
    private String myAge;

    public Animal() {
    }

    /** 
     * @hibernate.id
     *     generator-class=&quot;assigned&quot;
     *     type=&quot;java.math.BigDecimal&quot;
     *     column=&quot;ID&quot;
     */
    public BigDecimal getId() {
        return myId;
    }

    public void setId(BigDecimal theId) {
        myId = theId;
    }

    /** 
     * @hibernate.property
     *     column=&quot;AGE&quot;
     */
    public String getAge() {
        return myAge;
    }

    public void setAge(String theAge) {
        myAge = theAge;
    }
}
----

The child class:

----
import java.io.Serializable;

/** 
 * @hibernate.joined-subclass
 *   table=&quot;CAT&quot;
 *
 * @hibernate.joined-subclass-key
 *   column=&quot;ID&quot;
 */
public class Cat extends Animal implements Serializable {

    /** identifier field */
    private String myName;

    /** default constructor */
    public Cat() {
        super();
    }

    /** 
     * @hibernate.property
     *     column=&quot;NAME&quot;
     */
    public String getName() {
        return myName;
    }

    public void setName(String theName) {
        myName = theName;
    }
}
----

... this is generated when running XDoclet:

----
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;!DOCTYPE hibernate-mapping PUBLIC
    &quot;-//Hibernate/Hibernate Mapping DTD 2.0//EN&quot; 
    &quot;http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd&quot;&gt;

&lt;hibernate-mapping
&gt;
    &lt;class
        name=&quot;Animal&quot;
        table=&quot;ANIMAL&quot;
        dynamic-update=&quot;false&quot;
        dynamic-insert=&quot;false&quot;
        select-before-update=&quot;false&quot;
        optimistic-lock=&quot;version&quot;
    &gt;

        &lt;id
            name=&quot;id&quot;
            column=&quot;ID&quot;
            type=&quot;java.math.BigDecimal&quot;
        &gt;
            &lt;generator class=&quot;assigned&quot;&gt;
              &lt;!--  
                  To add non XDoclet generator parameters, create a file named 
                  hibernate-generator-params-Animal.xml 
                  containing the additional parameters and place it in your merge dir. 
              --&gt; 
            &lt;/generator&gt;
        &lt;/id&gt;

        &lt;property
            name=&quot;age&quot;
            type=&quot;java.lang.String&quot;
            update=&quot;true&quot;
            insert=&quot;true&quot;
            access=&quot;property&quot;
            column=&quot;AGE&quot;
        /&gt;

        &lt;!--
            To add non XDoclet property mappings, create a file named
                hibernate-properties-Animal.xml
            containing the additional properties and place it in your merge dir.
        --&gt;

        &lt;joined-subclass
            name=&quot;com.ipx.hibernate.Cat&quot;
            table=&quot;CAT&quot;
            dynamic-update=&quot;false&quot;
            dynamic-insert=&quot;false&quot;
        &gt;
        &lt;key
            column=&quot;ID&quot;
        /&gt;
        &lt;property
            name=&quot;name&quot;
            type=&quot;java.lang.String&quot;
            update=&quot;true&quot;
            insert=&quot;true&quot;
            access=&quot;property&quot;
            column=&quot;NAME&quot;
        /&gt;

        &lt;/joined-subclass&gt;

    &lt;/class&gt;

&lt;/hibernate-mapping&gt;</description>
		<content:encoded><![CDATA[<p>I guess it must be implemented since it works for me&#8230;</p>
<p>Below is an example.</p>
<p>The parent class:</p>
<p>&#8212;-<br />
import java.io.Serializable;<br />
import java.math.BigDecimal;</p>
<p>/**<br />
 * @hibernate.class<br />
 *     table=&#8221;ANIMAL&#8221;<br />
 */<br />
public class Animal implements Serializable {<br />
    private BigDecimal myId;<br />
    private String myAge;</p>
<p>    public Animal() {<br />
    }</p>
<p>    /**<br />
     * @hibernate.id<br />
     *     generator-class=&#8221;assigned&#8221;<br />
     *     type=&#8221;java.math.BigDecimal&#8221;<br />
     *     column=&#8221;ID&#8221;<br />
     */<br />
    public BigDecimal getId() {<br />
        return myId;<br />
    }</p>
<p>    public void setId(BigDecimal theId) {<br />
        myId = theId;<br />
    }</p>
<p>    /**<br />
     * @hibernate.property<br />
     *     column=&#8221;AGE&#8221;<br />
     */<br />
    public String getAge() {<br />
        return myAge;<br />
    }</p>
<p>    public void setAge(String theAge) {<br />
        myAge = theAge;<br />
    }<br />
}<br />
&#8212;-</p>
<p>The child class:</p>
<p>&#8212;-<br />
import java.io.Serializable;</p>
<p>/**<br />
 * @hibernate.joined-subclass<br />
 *   table=&#8221;CAT&#8221;<br />
 *<br />
 * @hibernate.joined-subclass-key<br />
 *   column=&#8221;ID&#8221;<br />
 */<br />
public class Cat extends Animal implements Serializable {</p>
<p>    /** identifier field */<br />
    private String myName;</p>
<p>    /** default constructor */<br />
    public Cat() {<br />
        super();<br />
    }</p>
<p>    /**<br />
     * @hibernate.property<br />
     *     column=&#8221;NAME&#8221;<br />
     */<br />
    public String getName() {<br />
        return myName;<br />
    }</p>
<p>    public void setName(String theName) {<br />
        myName = theName;<br />
    }<br />
}<br />
&#8212;-</p>
<p>&#8230; this is generated when running XDoclet:</p>
<p>&#8212;-<br />
&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;</p>
<p>&lt;!DOCTYPE hibernate-mapping PUBLIC<br />
    &#8220;-//Hibernate/Hibernate Mapping DTD 2.0//EN&#8221;<br />
    &#8220;http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd&#8221;&gt;</p>
<p>&lt;hibernate-mapping<br />
&gt;<br />
    &lt;class<br />
        name=&#8221;Animal&#8221;<br />
        table=&#8221;ANIMAL&#8221;<br />
        dynamic-update=&#8221;false&#8221;<br />
        dynamic-insert=&#8221;false&#8221;<br />
        select-before-update=&#8221;false&#8221;<br />
        optimistic-lock=&#8221;version&#8221;<br />
    &gt;</p>
<p>        &lt;id<br />
            name=&#8221;id&#8221;<br />
            column=&#8221;ID&#8221;<br />
            type=&#8221;java.math.BigDecimal&#8221;<br />
        &gt;<br />
            &lt;generator class=&#8221;assigned&#8221;&gt;<br />
              &lt;!&#8211;<br />
                  To add non XDoclet generator parameters, create a file named<br />
                  hibernate-generator-params-Animal.xml<br />
                  containing the additional parameters and place it in your merge dir.<br />
              &#8211;&gt;<br />
            &lt;/generator&gt;<br />
        &lt;/id&gt;</p>
<p>        &lt;property<br />
            name=&#8221;age&#8221;<br />
            type=&#8221;java.lang.String&#8221;<br />
            update=&#8221;true&#8221;<br />
            insert=&#8221;true&#8221;<br />
            access=&#8221;property&#8221;<br />
            column=&#8221;AGE&#8221;<br />
        /&gt;</p>
<p>        &lt;!&#8211;<br />
            To add non XDoclet property mappings, create a file named<br />
                hibernate-properties-Animal.xml<br />
            containing the additional properties and place it in your merge dir.<br />
        &#8211;&gt;</p>
<p>        &lt;joined-subclass<br />
            name=&#8221;com.ipx.hibernate.Cat&#8221;<br />
            table=&#8221;CAT&#8221;<br />
            dynamic-update=&#8221;false&#8221;<br />
            dynamic-insert=&#8221;false&#8221;<br />
        &gt;<br />
        &lt;key<br />
            column=&#8221;ID&#8221;<br />
        /&gt;<br />
        &lt;property<br />
            name=&#8221;name&#8221;<br />
            type=&#8221;java.lang.String&#8221;<br />
            update=&#8221;true&#8221;<br />
            insert=&#8221;true&#8221;<br />
            access=&#8221;property&#8221;<br />
            column=&#8221;NAME&#8221;<br />
        /&gt;</p>
<p>        &lt;/joined-subclass&gt;</p>
<p>    &lt;/class&gt;</p>
<p>&lt;/hibernate-mapping&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marvin</title>
		<link>http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/comment-page-1/#comment-49</link>
		<dc:creator>Marvin</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.murraywilliams.com/wp/?p=55#comment-49</guid>
		<description>XDoclet 1.2.3 works for me as well, as per Osten&#039;s example.  I spent ages trying to figure out why XDoclet wasn&#039;t generating the joined-subclass&#039; mapping document, when I realised it had generated the joined-subclass mapping _inside_ the superclass.

Very annoying as there appears to be no way to override it, but given the fact that all my Hibernate mappings are generated, I&#039;m not too worried about overly complex metadata.</description>
		<content:encoded><![CDATA[<p>XDoclet 1.2.3 works for me as well, as per Osten&#8217;s example.  I spent ages trying to figure out why XDoclet wasn&#8217;t generating the joined-subclass&#8217; mapping document, when I realised it had generated the joined-subclass mapping _inside_ the superclass.</p>
<p>Very annoying as there appears to be no way to override it, but given the fact that all my Hibernate mappings are generated, I&#8217;m not too worried about overly complex metadata.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nikhil gupte</title>
		<link>http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/comment-page-1/#comment-50</link>
		<dc:creator>nikhil gupte</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.murraywilliams.com/wp/?p=55#comment-50</guid>
		<description>It doesn&#039;t work where there are more than 2 classes in the heirarchy...

Also, if there are say 3 classes, and the middle class doesn&#039;t need to be persisted, xdoclet cannot proceed to the very last child unless the middle class too is given un-necessary hibernate tags.</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t work where there are more than 2 classes in the heirarchy&#8230;</p>
<p>Also, if there are say 3 classes, and the middle class doesn&#8217;t need to be persisted, xdoclet cannot proceed to the very last child unless the middle class too is given un-necessary hibernate tags.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Murray Todd Williams</title>
		<link>http://www.murraywilliams.com/2005/03/26/xdoclet-hibernate-joined-subclass-tags-dont-work/comment-page-1/#comment-51</link>
		<dc:creator>Murray Todd Williams</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.murraywilliams.com/wp/?p=55#comment-51</guid>
		<description>I just noticed all this discussion. As it turns out, the problem had been mine. I think it was that I had forgotten to explicitly write what the parent class was inside the subclass. I&#039;d assumed that XDoclet would have parsed that and looked things up.

It did throw me later that the generated code was inside the parent class&#039;s mapping file. Generally I&#039;m getting more frustrated with XDoclet and I&#039;m ready to get us away from that tool altogether. Most agonizing is the fact that XDoclet breaks if you use ANY of the Java 1.5 language features. I&#039;ve seen indication somewhere that this is fixed as of XDoclet 1.5, but I can&#039;t find a 1.5 anywhere, and it certainly won&#039;t be compatible with JBoss-IDE in Eclipse.

I&#039;m just anxious to move to Hibernate 3 Annotations as quickly as humanly possible!
</description>
		<content:encoded><![CDATA[<p>I just noticed all this discussion. As it turns out, the problem had been mine. I think it was that I had forgotten to explicitly write what the parent class was inside the subclass. I&#8217;d assumed that XDoclet would have parsed that and looked things up.</p>
<p>It did throw me later that the generated code was inside the parent class&#8217;s mapping file. Generally I&#8217;m getting more frustrated with XDoclet and I&#8217;m ready to get us away from that tool altogether. Most agonizing is the fact that XDoclet breaks if you use ANY of the Java 1.5 language features. I&#8217;ve seen indication somewhere that this is fixed as of XDoclet 1.5, but I can&#8217;t find a 1.5 anywhere, and it certainly won&#8217;t be compatible with JBoss-IDE in Eclipse.</p>
<p>I&#8217;m just anxious to move to Hibernate 3 Annotations as quickly as humanly possible!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
