Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a "stored procedure" with HIbernate

 
Alex Bognetz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I know that there is a way to call a stored procedure by Hibernate.
Is there a way to create a stored procedure as well?

I need to create a stored procedure dynamically in Pl/PsgSQL and then storing it the db with hibernate.

Example:
I have a form with a text area so a user can write pl/PsgSql code inside
When the user submits the form , the code has to be stored as a procedure in the db.
I'd would be great if I could check also the pl/PsgSql syntax, if possible.

Anyone can help me?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate supports native queries. Just use them.

As for PL/SQL syntax, Hibernate can't do that. You can either display any SQL error that comes back or you could use something like antlr with a PL/SQL grammar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic