Search code examples
grailsgrails-ormgrails3.2.0

Grails 3.2 - object version doesn't update


Here is simple structure:

class Dom1 {
  /* some props */
  Dom2 dom2
}
class Dom2 {
  /* some props */
}

Let's say a dom2 object has been initialized. If i create dom1 object like this:

def dom1 = new Dom1(dom2: dom2).save(flush:true)

i've got dom1 with version=0; But after regetting dom1 from DB like:

dom1 = Dom1.get(dom1.id)

i've got dom1 with version=1.

DB record has version=1 too. Before upgrading from Grails 3.1 to 3.2 the problem doesn't exist.

Is anyone know how to fix it? Thanx.


Solution

  • Last Grails 3.2.6 has no this issue.