开发者

spring saveOrUpdate

开发者 https://www.devze.com 2023-02-25 08:42 出处:网络
I am trying to build a web application using Spring and Hibernate. I have an object which is being saved in the database (hibernateTemplate.SaveOrUpdate method) with an id generated by hibernate. My q

I am trying to build a web application using Spring and Hibernate. I have an object which is being saved in the database (hibernateTemplate.SaveOrUpdate method) with an id generated by hibernate. My question is: how can I get the 开发者_运维百科automatically generated id ?


Use save to get the generated key back.

0

精彩评论

暂无评论...
验证码 换一张
取 消