This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes how to insert data in stored procedure from hibernate? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "how to insert data in stored procedure from hibernate?" Watch "how to insert data in stored procedure from hibernate?" New topic
Author

how to insert data in stored procedure from hibernate?

raj jaiswal
Ranch Hand

Joined: Nov 25, 2008
Posts: 56
hi,
All i am trying to insert data in database by using store procedure .
i am getting error .please find the solution..




my code is....

this is
the method where i calling store procedure....




this is hbm.xml file



Please provide me solution
Thanks
Raj jaiswal
shiva valanukonda
Greenhorn

Joined: Sep 27, 2010
Posts: 25

Hi raj jaiswal,
I was facing the same problem and getting the same error .
Finally i got concluded that " native Query" doesnot supported for calling a stored procedure.
If you got any solutions please revert back to me .

Thanks
Shiva
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You can use stored procedures in Hibernate for querying if the procedure returns a result set as its first out parameter. There are a number of other important restrictions that are worth reading, specifically the callable attribute.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to insert data in stored procedure from hibernate?