2014-12-02晚上
Hibernate学习
Hebenate3 创建session: Configuration cfg=new Configuration.configu();
SessionFactory sessionFactory=cfg.buildSessionFactory();
Herbernate 4 创建session: Configuration cfg=new Configuration.configu();
ServiceRegiestry serviceRegiestry=new ServiceRegiestryBuilder.ApprySettings(cfg.getPropertys()).buildServiceRegiestry();
SessionFactory sessionFactory=cfg.buildSessionFactory(sereviceRegiestry);
Session session=sessionFactory.openSession();
cascade="all"