已采纳回答 / LytZz
不同hibernate版本,出现了不同的创建方式该文章可以参考一下http://www.cnblogs.com/lastren/archive/2012/01/29/2331034.html
2016-07-23
最赞回答 / weibo_慕移动8059783
这是另外一种方法,后来用了最新的Hibernate,需要做些更改,Configuration config = new Configuration().configure(); config.addClass(Students.class); //**这里需要新加 ServiceRegistry serviceRegistry=new StandardServiceRegistryBuilder().applySettings(config.getProperties()).build();
2016-07-21
已采纳回答 / 橘子先生zZ
不允许修改,实际使用的谁会去改主键除非业务需要但是效率很低下一般都会用非业务字段(就是除了唯一标识符没什么实际作用,不像学号等有实际含义的数字)当主键
2016-07-18