--- Stanislav Bryzgalov <[EMAIL PROTECTED]> wrote:

> Hi, folks
> 
> 
> It looks like the order in which @hibernate.column
> and
> @hibernate.formula tags appear gets changed in a
> generated file with
> column moving to the top. For example,
> 
> @hibernate.many-to-one
> @hibernate.formula value="CLIENT_ID"
> @hibernate.formula value="CARRIER_ID"
> @hibernate.column name="ACCOUNT_NO" length="32"

Order of tags is irrelevant, it's in the jelly 
template:
           <!-- process meta elements -->
            <j:forEach var="metaTag"
items="${property.entity.getTagsByName('hibernate.meta')}">
                <j:import uri="/Meta.jelly"
inherit="true"/>
            </j:forEach>

            <j:forEach var="columnTag"
items="${property.entity.getTagsByName('hibernate.column')}">
                <j:import uri="/Column.jelly"
inherit="true"/>
            </j:forEach>

            <j:forEach var="formulaTag"
items="${plugin.getTags(property.entity,'hibernate.formula')}">
                <j:import uri="/Formula.jelly"
inherit="true"/>
            </j:forEach>

> results in
> 
> <many-to-one name="account">
>    <column name="ACCOUNT_NO" length="32"/>
>    <formula>CLIENT_ID</formula>
>    <formula>CARRIER_ID</formula>
> </many-to-one>
> 
> which does not seem right and it does not work
> unless I manually
> change order in .hbm-file. Did anyone come across
> this before? Are
> there any known workarounds?

Accrding to current 3.0 DTD:
------------%<-----------------
<!ELEMENT many-to-one (meta*,(column|formula)*)>
----------------%<------------------
So order shall be irrelevant. 


If you  like to change this, nobody prevents you from
modifying temlpate in question:
( org/xdoclet/plugin/hibernate/ManyToOne.jelly )
You may be even able to feed your custom version 
to xdoclet instead of one contained in jar if you 
manipulate classloading / resources.

regards, ( ili preved ;) ) 



----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to