• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating a "stored procedure" with HIbernate

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic