我已经得到了其中ID定义为 BIGSERIAL A Postgres的表。怎么样我可以使用 @Insert 并取回插入实体的ID?我是期待映射器的方法要么返回ID或填充ID实体对象内场。任何想法?
I've got a postgres table where the ID is defined as bigserial. How can I use @Insert and get back the id of the inserted entity? I am expecting the mapper method to either return the id or populate the id field inside the entity object. Any ideas?
推荐答案NVM,我想我找到了答案其他线程上,mybatis-user.963551.n3.nabble/How-to-return-the-ID-of-the-inserted-object-under-Postgres-td1926959.html
NVM, i think i found the answer on the other thread, mybatis-user.963551.n3.nabble/How-to-return-the-ID-of-the-inserted-object-under-Postgres-td1926959.html
有是谁在这里登陆的链接,其他任何人。
There's the link for anyone else who lands here.
更多推荐
MyBatis的:如何给Postgres下返回插入对象的ID?
发布评论