grails « Insert « JPA Q&A





1. Can domain classes be configured to insert a new record instead of updating when saved?    stackoverflow.com

When I change a domain object, rather than updating the database record, I'd like to archive the old record record and create a new one. I'd like to force GORM ...

2. Grails and HQL Recover Insert ID    stackoverflow.com

Is there a way to recover the last generated auto_increment identifier generated by an insert when using Hibernate ? I know from my php background that you can get this information ...