-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Xdoclet 1.2.2 CVS
PostPosted: Sun Oct 17, 2004 6:33 am 
Beginner
Beginner

Joined: Sat Oct 09, 2004 2:35 pm
Posts: 43
Location: Tenerife
I do not know who is responsible for XDoclet CVS modifications, but these ones should be added as soon as possible...

As I have problems with a many-to-one relationship and I am using XDoclet to generate my hbm files, I have been having a look at XDoclet code and I have found this:

File:

xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-properties.xdt

It says:

Code:
    <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one">
        <many-to-one
            name="<XDtMethod:propertyName/>"
            class="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="class" default="<XDtMethod:methodType/>" />"
            cascade="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="cascade" values="none,all,save-update,delete" default="none"/>"
            outer-join="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="outer-join" values="true,false,auto" default="auto"/>"
          <XDtConfig:ifConfigParamEquals paramName="version" value="2.0">
            update="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="update" values="true,false" default="true"/>"
            insert="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="insert" values="true,false" default="true"/>"
            access="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="access" values="field,property,Class" default="property"/>"
           <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one" paramName="foreign-key">
            foreign-key="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="foreign-key"/>"
           </XDtMethod:ifHasMethodTag>
            <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one" paramName="property-ref">
            property-ref="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="property-ref"/>"
            </XDtMethod:ifHasMethodTag>   
          </XDtConfig:ifConfigParamEquals>
          <XDtHibernate:setCurrentTag name="hibernate.many-to-one" mappingElement="many-to-one">
               <XDtMerge:merge file="xdoclet/modules/hibernate/resources/hibernate-column.xdt">
               </XDtMerge:merge>
          </XDtHibernate:setCurrentTag>
    </XDtMethod:ifHasMethodTag>


ant it had to say:

Code:
   <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one">
        <many-to-one
            name="<XDtMethod:propertyName/>"
            class="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="class" default="<XDtMethod:methodType/>" />"
            cascade="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="cascade" values="none,all,save-update,delete" default="none"/>"
            outer-join="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="outer-join" values="true,false,auto" default="auto"/>"
          <XDtConfig:ifConfigParamEquals paramName="version" value="2.0">
            not-null="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="not-null" values="true,false" default="false"/>"
            unique="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="unique" values="true,false" default="false"/>"
            update="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="update" values="true,false" default="true"/>"
            insert="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="insert" values="true,false" default="true"/>"
            access="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="access" values="field,property,Class" default="property"/>"
           <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one" paramName="foreign-key">
            foreign-key="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="foreign-key"/>"
           </XDtMethod:ifHasMethodTag>
            <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one" paramName="property-ref">
            property-ref="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="property-ref"/>"
            </XDtMethod:ifHasMethodTag>   
            <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one" paramName="index">
            index="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="index"/>"
            </XDtMethod:ifHasMethodTag>   
          </XDtConfig:ifConfigParamEquals>
          <XDtHibernate:setCurrentTag name="hibernate.many-to-one" mappingElement="many-to-one">
               <XDtMerge:merge file="xdoclet/modules/hibernate/resources/hibernate-column.xdt">
               </XDtMerge:merge>
          </XDtHibernate:setCurrentTag>
    </XDtMethod:ifHasMethodTag>


having added these lines:

Quote:
not-null="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="not-null" values="true,false" default="false"/>"
unique="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="unique" values="true,false" default="false"/>"


Quote:
<XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one" paramName="index">
index="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="index"/>"
</XDtMethod:ifHasMethodTag>

BECAUSE these three methods are used in xdoclet documentation and dtd.

In fact, I only needed the first one but DTD has got defined the other two, also.

Now, my hbm file is properly generated with my many-to-one
Quote:
not-null="true"


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 17, 2004 7:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Send this to the XDoclet lists or add it to their JIRA bug tracking system.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.