Re: hibernate lazy on many-to-one

"Frank Russo" <[email protected]>
Newsgroups gmane.comp.java.xdoclet-plugins
Message-ID <[email protected]>
Sorry. I just realized we're using Xdoclet 1.2.3. I'll look into using
Xdoclet 2... 


Frank Russo
Senior Developer
FX Alliance, LLC


-----Original Message-----
From: xdoclet-plugins-interest-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:xdoclet-plugins-interest-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On
Behalf Of Konstantin Priblouda
Sent: Tuesday, November 14, 2006 2:33 PM
To: xdoclet-plugins-interest-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [xdoclet-plugins-interest] hibernate lazy on many-to-one



--- Frank Russo <[email protected]> wrote:

> I got the merge working. 
> 
> I tried using lazy on the many-to-one, but it got ignored. It may be a

> bug. Here is my xdoclet tag:
> @hibernate.many-to-one column="ENTITY_DM_ID"
> lazy="false" fetch="join"
> 
> This generated: 
> <many-to-one 
> 	name="mechanism" 
> 
>
class="com.fxall.dealfeed.model.EntityDeliveryMechanism"
> 
> 	cascade="none" 
> 	outer-join="auto" 
> 	update="true" 
> 	insert="true" 
> 	column="ENTITY_DM_ID" 
> 	unique="false" 
> 	optimistic-lock="true" 
> 	not-found="exception" 
> 	embed-xml="true" 
> />
> 
> This doesn't contain a lazy attribute. It seems to be ignored...

copy from actual jelly template:


    <j:if test="${manyToOneTag != null}">
        <many-to-one
            name="${property.name}"
            class="${manyToOneTag.class_}"
            access="${property.access}"
            entity-name="${manyToOneTag.entityName}"
           
column="${plugin.buildComponentColumnName(manyToOneTag.column)}"
            not-null="${manyToOneTag.notNull}"
            unique="${manyToOneTag.unique}"
            cascade="${manyToOneTag.cascade}"
            outer-join="${manyToOneTag.outerJoin}"
            fetch="${manyToOneTag.fetch}"
            update="${manyToOneTag.update}"
            insert="${manyToOneTag.insert}"
           
foreign-key="${plugin.buildComponentColumnName(manyToOneTag.foreignKey)}
"
            property-ref="${manyToOneTag.propertyRef}"
           
optimistic-lock="${manyToOneTag.optimisticLock}"
            formula="${manyToOneTag.formula}"
            index="${manyToOneTag.index}"
            lazy="${manyToOneTag.lazy}"
            embed-xml="${manyToOneTag.embedXml}"
            node="${manyToOneTag.node}"
            not-found="${manyToOneTag.notFound}">

So it is definitely used.  And xdoclet2 would not allow you to use wring
parameter name of tag - it will bomb.
I just checked with actual version of plugin ( 1.0.4-SNAPSHOT ) 

and lazy="false" shows in mapping an breaks unit test

regards,


----[ 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


 
________________________________________________________________________
____________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index

------------------------------------------------------------------------
-
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=DEVDE
V
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest




-------------------------------------------------------------------------
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.