-->
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: views and stored procedure
PostPosted: Sat Sep 05, 2009 4:09 am 
Beginner
Beginner

Joined: Sat Aug 01, 2009 5:28 am
Posts: 42
does hibernate support calling views and stored procedure
is there any tutorial how to access view and stored procedure

_________________
Warm Regards,
Tarun Walia


Top
 Profile  
 
 Post subject: Re: views and stored procedure
PostPosted: Sat Sep 05, 2009 8:39 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Here's a thread about calling stored procedures from Hibernate:

https://forums.hibernate.org/viewtopic.php?f=1&t=999169

Quote:
The CallableStatement interface used to execute SQL stored procedures. The JDBC API provides a stored procedure SQL escape syntax that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one form that includes a result parameter and one that does not.


Here's a thread about mapping JavaBeans to database views using Hibernate:

http://www.coderanch.com/t/218656/Object-Relational-Mapping/java/Hibernate-views#1036491

Quote:
Does Hibernate support database views?

Of course. From the point of view of Hibernate, a view is just like any other table (except that you might not be able to update or insert to a view). You can easily map a class to a view by specifying table="view_name".

In Hibernate3, you may even map an entity class to a SQL query result set using the <subselect> mapping element. This is useful if you are unable to define new views in your database.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: Re: views and stored procedure
PostPosted: Mon Sep 07, 2009 2:48 am 
Beginner
Beginner

Joined: Sat Aug 01, 2009 5:28 am
Posts: 42
Thanks Cameron....
Its always pleasent to see the quick response from someone when u r eagerly looking for it.

_________________
Warm Regards,
Tarun Walia


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.