This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Named Query

 
vinoth raj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IQuery query = session.GetNamedQuery("queryName");

Is there any mapping has to be done for this.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hard to say. What is the API you are using?
 
Ritvick Nigam
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vinoth,

I think you need to define the named query in the hibernate mapping file for the given class.

Regards,
Ritvick
[ September 20, 2008: Message edited by: Ritvick Nigam ]
 
Bikram Sinha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Named Queries are to be defined in the corresponding hbm file.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or they can be defined as Annotations at the class level.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic