Comments
|
|
Posted By srinivasu namburi On 10-May-10 04:20:53 PM
Sir, Its really good example ..... If possible could u pls provide any example on hibernate caching ...first level and second level of caching techniques...
|
|
|
Posted By Prabhas Raju On 10-May-10 05:30:08 PM
Thank you very much sir.
iam searching for this from a week.
in interview of L&T Infotech they asked me the same question.
Thanks & Regards
Raju
|
|
|
Posted By Puru On 26-May-10 09:52:42 PM
I used the native sql approach and I am getting :"could not execute native bulk manipulation query error".
Below is my code:
Query q = session.createSQLQuery(" { call SP_LIB_DTL_INSERT(?,?,?,?) }");
q.setLong(0, lib.getBranch_Code());
q.setLong(1, lib.getAuth_Code());
q.setString(2, lib.getBookName());
q.setLong(3, lib.getISBN());
//@SuppressWarnings("unchecked")
System.out.println("before getting the list");
int retval=q.executeUpdate();
Appreciate your help
|
|
|
Posted By sivagopal On 18-Jun-10 01:58:06 AM
This is not really calling stored proc using hibernate, just obtained connection thru hibernate and used the same old approach of using prepare call method...I still believe there is no approach of calling stored proc, by using a hibernate config file...I am being stupid to raise this concern, your explanation is much appreciated...
|
|
|
Posted By N.SivaPrasad On 08-Aug-10 10:02:08 PM
Simply Superb...
|
|
|
Posted By Jamil On 22-Aug-10 08:29:00 PM
I am getting error, Please assist
My Code.
Query q = session.createSQLQuery("{call p_insertRegisterData(?,?,?,?)}");
q.setInteger(0, 5002);
q.setString(1, "XYZ2");
q.setString(2, "XYy2");
q.setString(3, "XYx2");
q.executeUpate();
error:
Update queries only supported through HQL.
Please advice, Thanks in advance.
Thanks,
Jamil
|
|
|
Posted By Andrew On 15-Sep-10 01:32:08 AM
Don't use .executeUpdate() use .getListResult()
|
|
|
Posted By Marco Alvarez On 19-Apr-11 09:10:50 PM
Thank, thank and more thanks!!!!
|
|
|
Posted By Gopala Krishna On 18-Jul-11 06:58:09 PM
Thank you very much Boss. It helps me a lot.But this is Data base dependent i think so. i want independent data base procedure for insertion.like using getNameQuery("") from mapping file. please help me out of this.
Thanks in Advance,
|
|
|
Posted By raj On 14-Sep-11 03:58:10 PM
can we use HQL?
|