Professional Documents
Culture Documents
Hibernate
Hibernate
Prerequisite
…………………
Application
Database
Hibernate
……………..
Hibernate,ibatis,toplink
To
Implementation-
1.Create Maven Project (it will give proj structure, configuration files get loaded)
2.Internal/webapp
3.Mysql
App.java
…………..
Alien class
}getters setters
Alien
……….
SessionFactory sf=con.buildSessionFactory();
Dependency in pom.xml
Configuration file
…………………….
New->hibernate.cfg.xml->specify
SessionFactory sf=con.buildSessionFactory(reg);
Session session=sf.openSession();
Transaction tx=session.beginTransaction)
Tx.commit();
Prop name=”hbm2ddl.auto”>create/update</prop>