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

Hibernate's getNamedQuery()

 
gp innet
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am new to Hibernate, Well i am trying to execute query using getNameQuery('queryName') which is defined in one of my x.hbm.xml file.Well i want some parameters to be excuded runtime.
For e.g I have following query

<query name="getAllStudentEssays">
<![CDATA[
SELECT b,a.topic, c.userLastName, c.userFirstName
FROM EssayTopic as a, StudentEssay as b, PHCoreUsers as c, WSFCoreClassEnrollment as d
WHERE a.isbnOID = :isbnOID
AND a.topicOID = b.topicOID
AND b.status != :status
AND b.userOID = c.userOID
AND c.personOID = d.studentOID
AND d.classPeriodOID = :classPeriodOID
ORDER BY a.sortOrder DESC, c.userLastName, c.userFirstName, b.submissionDateTime DESC
]]>
</query>

Now I need 'status clause' to be removed totally from the whereclause.
Please help me out !
 
Venkat dasari
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Will you be more precise regarding your doubt.? First of all i want to know what harm will it do if you remove the status clause from your query?
And, are you using Hibernate Synchronizer?
Regards,
Venkat Dasari
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic