
id将为您填充该属性。所以如果你有
MyThing thing = new MyThing();...// save the transient instance.dao.save(thing);// after the session flushes, thing.getId() should return the id.
实际上,我几乎总是
assertNotNull在测试中对持久实体的ID进行一次 *** 作,以确保保存有效。
欢迎分享,转载请注明来源:内存溢出

id将为您填充该属性。所以如果你有
MyThing thing = new MyThing();...// save the transient instance.dao.save(thing);// after the session flushes, thing.getId() should return the id.
实际上,我几乎总是
assertNotNull在测试中对持久实体的ID进行一次 *** 作,以确保保存有效。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)