Save And Update Method




What    is  deference between  save and update ?

  In hibernate  save() and update() method  is used in transaction. These method are  from session class.  The basic  difference between these  methods are 

   Save()-   Is  code as  Session  se= new  sessionFactory.openSession(); 
                                               ---------------
                                               -- se.save( object Entity);
       which   add new  row  in to the table  in Database.
   Method save  is  Serializable . 

  update () -   Is  code as  Session  se= new  sessionFactory.openSession(); 
                                               ---------------
                                               -- se.update( object Entity);
                which  update the  exiting row data in to the table in  database . It  wont 
          creates new row in to the table. It not serializable.
Save And Update Method Save  And Update  Method Reviewed by Mukesh Jha on 2:53 AM Rating: 5

No comments:

Add your comment

All Right Reserved To Mukesh Jha.. Theme images by Jason Morrow. Powered by Blogger.