• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to stop exection of query for many to one  RSS feed

Rajan Nath
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
due to which for every require select query , query for code value also executed resulting a performance hit.

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