Answered Questions

  • Execute Stored procedure in Hibernate

    How to invoke a stored procedure in Hibernate and pass in a parameter?I have { ? = call myservice.TEST_PROC3( ? ) }While I can get stored proc output if there is no input to TEST_PROC3, e.g. call myservice.TEST_PROC3( )I don't know how to code in Java to pass in the parameter required in my case with:call myservice.TEST_PROC3( ? )Can anyone show me how to make such call in Java?Thanks

  • What is the difference between and merge and update

    Star Read Best Answer

    Editorial / Best Answer

    promisingram  

    • Member Since Oct-2008 | Oct 19th, 2008


    Use update() if you are sure that the session does not contain an already persistent instance with the same identifier, and merge() if you want to merge your modifications at any time without consideration of the state of the session. In other words, update() is usually the first method you would call in a fresh session, ensuring that reattachment of your detached instances is the first operation that is executed.

    Thomas John

    • Sep 21st, 2015

    I create an object say Employee with id 1. I create this object by getting the student record from the database. Object s1 is in the session Employee e1 = null; Object o = session1.get(Employee.cl...

    Mukesh Vishwakarma

    • Aug 25th, 2015

    Update will work at same session. After close the session or detached the state, update will not work.
    But in the case of Merge after closed the session it will work.