用的hibernate4 为什么添加数据成功 但是为空?SQL也显示出来了 private SessionFactory sessionFactory; public void save(Product product){ Session session = this.getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); session.save(product); tx.commit(); session.close(); }
应该是对象没传过来