-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate and stored procedures
PostPosted: Wed Jul 22, 2009 4:42 pm 
Newbie

Joined: Mon Jul 20, 2009 1:36 pm
Posts: 4
Is it possible to use Hibernate with only stored procedures? My organization does not allow SQLs outside of stored procs and I am trying to see if Hibernate will work with only stored procedures.

For basic CRUD operations, I can define custom SQLs/SPs with sql-insert/sql-update/loader/etc. But what about joins?

Thanks for any info!


Top
 Profile  
 
 Post subject: Re: Hibernate and stored procedures
PostPosted: Fri Jul 24, 2009 9:48 am 
Newbie

Joined: Mon Jul 20, 2009 1:36 pm
Posts: 4
I think I figured out the answer for joins. You can define custom loaders under the "set" tags.

I am still looking for a definitive answer to whether Hibernate can be configured to work without using any generated SQL. Anyone?


Top
 Profile  
 
 Post subject: Re: Hibernate and stored procedures
PostPosted: Fri Jul 24, 2009 12:44 pm 
Newbie

Joined: Mon Jul 20, 2009 1:36 pm
Posts: 4
Replying to myself again... from the Hibernate product evaluation FAQs: (https://www.hibernate.org/263.html)

Does Hibernate support handwritten SQL?

In Hibernate 3.0, any generated SQL statement may be overridden in the Hibernate mapping metadata. Hibernate also supports queries expressed in the native SQL dialect of the underlying database and offers facilities to integrate them cleanly into your application without creating dependencies. In practice, most users find that they need these features much less often than they expect.

In addition, Hibernate allows definition of "derived" entities and derived attributes, where a class or property maps to a SQL select or SQL formula embedded in the mapping document


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.