Wednesday, 9 October 2013

Hibernate Output-01


What is the Output of this program 




public static void main(String[] args) {
              UserDetails user= new UserDetails();
       user.setUserName("Fist User");
                  SessionFactory sessionFactory =     new Configuration().configure().buildSessionFactory();
           Session session = sessionFactory.openSession();
           session.beginTransaction();
user.setUserName("Second User");
user.setUserName("Third  User");
           session.save(user);
   user.setUserName("Fourth   User");  
   user.setUserName("Fifth   User");  
           session.getTransaction().commit();
           session.close();
                      
   }
   
What is the Current data stored in the data base  ?

Ans is - Fifth User 
 Please go through diagram

 

No comments:

Post a Comment

Very Impotent Links for Java and Portal development development

Jar Download for Spring  Maven Or Gradel Dependency for Spring