Grails Hibernate4 upgrade errors on getGeneratedKe

2020-06-08 18:40发布

问题:

I'm upgrading to the Hibernate4:4.3.5.3 plugin for Grails 2.3.9 . However, I'm getting an error:

getGeneratedKeys() support is not enabled

I haven't been able to find any configuration details on how to enable this.

回答1:

I just found that you can configure it under DataSource.groovy in the hibernate{...} block

hibernate{
    jdbc.use_get_generated_keys = true
}