摘要:
1、 第一种,用?占位符,如: //登录(用?占位符) public List LoginUser(UserPO up)throws Exception{ Session session = HibernateSessionFactory.getSession(); String hql = "from UserPO where name = ? and pwd= ?"; Que... 阅读全文
摘要:
1 session.save(Object object); 增加 2 session.update(Object object);修改 3 session.saveOrUpdate(Object object);主键字段有值则修改,无则新增。 4 session.update(Object obj 阅读全文
摘要:
final Session session = getSession(); try { System.out.println("querying all the managed entities..."); final Metamodel metamodel = session.getSessionFactory().getMet... 阅读全文