wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes How to call function from hibernate?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to call function from hibernate??" Watch "How to call function from hibernate??" New topic
Author

How to call function from hibernate??

Vimal Panchal
Greenhorn

Joined: Jun 22, 2007
Posts: 8
Hello Javaties,

I new with hibernate can you please help to call oracle function from hibernate?
I am getting some error in that.
See the code which i have return in main file.
and call the function many way but didn't get any result.




[Edited to use code tags - Paul Sturrock]
[ June 22, 2007: Message edited by: Paul Sturrock ]

vimal panchal
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


I am getting some error in that.

What does the error say?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

You cannot call a Stored Procedure/Function that way, your named query is no where to be found, that is the error that you are getting.

Here is the Hibernate docs for using Stored Procedures/Functions

http://www.hibernate.org/hib_docs/v3/reference/en/html/querysql.html#sp_query

Good Luck

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
GeeCON Prague 2014
 
subject: How to call function from hibernate??