|Home |Login |Registration |Struts Step by Step Tutorial |Hibernate Step by Step Tutorial |Spring Step by Step Tutorial |JSP Step by Step Tutorial |JDBC Step by Step Tutorial |Web Services Step by Step Tutorial |EJB fundamentals | ORACLE Step by Step Tutorial | SCJP 5.0 and SCJP 6.0 Study Guide | SCWCD 5.0 Study Guide | SCJP Tips
Java mock test | SCJP mock test | SCJP DUMP | SCBCD mock test |Java online test exam | JSP online test | ORACLE online test | Hibernate online test | Servlet online test | Struts online test | EJB online test | C online test | C++ online test | Aptitude online test

Java interview questions | JSP interview questions | ORACLE interview questions | Hibernate interview questions | Servlet interview questions | Struts interview questions | JDBC interview questions | C/C++ interview questions | Spring interview questions | JMS interview questions | Informatica interview questions | EJB interview questions | OOPS and Design Pattern interview questions
1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc) JobsJobs and Walkins

 

Recent Questions

!!! Hibernate Frequently Asked Questions !!!

SQL Queries In Hibernate..

SCJP 1.5/1.6 Exam Kit

!!!Answer!!!- From Technical Expert

You may express a query in SQL, using createSQLQuery() and let Hibernate take care of the mapping from
result sets to objects. Note that you may at any time call session.connection() and use the JDBC Connection
directly. If you chose to use the Hibernate API, you must enclose SQL aliases in braces:
List cats = session.createSQLQuery(
"SELECT {cat.*} FROM CAT {cat} WHERE ROWNUM<10",
"cat",
Cat.class
).list();
List cats = session.createSQLQuery(
"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, " +
"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ... " +
"FROM CAT {cat} WHERE ROWNUM<10",
"cat",
Cat.class
).list()
SQL queries may contain named and positional parameters, just like Hibernate queries.

Answered By : null Replied Date : Mar 23 2012
Answer :


Answered By : null Replied Date : Mar 3 2012
Answer :


Answered By : null Replied Date : Jan 14 2012
Answer :


Answered By : null Replied Date : Dec 7 2011
Answer :


Answered By : null Replied Date : Dec 7 2011
Answer :


Answered By : null Replied Date : Nov 19 2011
Answer :


Answered By : null Replied Date : Oct 26 2011
Answer :


Answered By : null Replied Date : Aug 29 2011
Answer :


Answered By : null Replied Date : Aug 19 2011
Answer :


Answered By : null Replied Date : Aug 6 2011
Answer :


Answered By : null Replied Date : Jun 25 2011
Answer :


Answered By : null Replied Date : Jun 18 2011
Answer :


Answered By : null Replied Date : May 12 2011
Answer :


Answered By : null Replied Date : Apr 28 2011
Answer :


Answered By : null Replied Date : Apr 18 2011
Answer :


Answered By : null Replied Date : Mar 18 2011
Answer :


Answered By : null Replied Date : Mar 16 2011
Answer :


Answered By : null Replied Date : Feb 26 2011
Answer :


Answered By : null Replied Date : Feb 20 2011
Answer :


Answered By : null Replied Date : Jan 15 2011
Answer :


Answered By : null Replied Date : Dec 25 2010
Answer :


Answered By : null Replied Date : Dec 23 2010
Answer :


Answered By : null Replied Date : Dec 14 2010
Answer :


Answered By : null Replied Date : Dec 13 2010
Answer :


Answered By : null Replied Date : Dec 13 2010
Answer :


Answered By : null Replied Date : Dec 12 2010
Answer :


Answered By : null Replied Date : Dec 12 2010
Answer :


Answered By : null Replied Date : Dec 10 2010
Answer :


Answered By : null Replied Date : Nov 22 2010
Answer :


Answered By : null Replied Date : Nov 19 2010
Answer :


Answered By : null Replied Date : Nov 7 2010
Answer :


Answered By : null Replied Date : Oct 25 2010
Answer :


Answered By : null Replied Date : Aug 21 2010
Answer :


Answered By : null Replied Date : May 8 2012
Answer :


Answered By : null Replied Date : May 27 2012
Answer :


Answered By : null Replied Date : Jul 3 2012
Answer :


Answered By : null Replied Date : Jul 29 2012
Answer :


Answered By : null Replied Date : Aug 14 2012
Answer :


Answered By : null Replied Date : Sep 2 2012
Answer :


Answered By : null Replied Date : Sep 7 2012
Answer :


Answered By : null Replied Date : Sep 7 2012
Answer :


Answered By : null Replied Date : Sep 30 2012
Answer :


Answered By : null Replied Date : Oct 10 2012
Answer :


Answered By : null Replied Date : Nov 10 2012
Answer :


Answered By : null Replied Date : Nov 14 2012
Answer :


Answered By : null Replied Date : Dec 5 2012
Answer :


Answered By : null Replied Date : Dec 18 2012
Answer :


Answered By : null Replied Date : Feb 27 2013
Answer :


Answered By : null Replied Date : Feb 28 2013
Answer :


Answered By : null Replied Date : Mar 18 2013
Answer :


 

You can also contribute to this answer:

Your Name:
Answer:

 
Ask Question and get answer from Expert.
View Answers List from Expert.

The information you are posting should be related to java and ORACLE technology. Not political.