Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to stop exection of query for many to one

 
Rajan Nath
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to stop some unwanted sql query execution due relation in .hbm.xml

By using lazy="proxy" the sql query for that class not executed but if I used both 'not-found="ignore" lazy="proxy"' then it can not stop the execution of query

My entry in .hbm.xml is like

<many-to-one name="state" class="com.ind.model.CodeValue" not-found="ignore" lazy="proxy">
<column name="State" not-null="false" />

the select query also executes for CodeValue
</many-to-one>
due to which for every require select query , query for code value also executed resulting a performance hit.

Thanks & Regards,
Raj
[ March 18, 2008: Message edited by: Rajan Nath ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic