Details
Description
Have the following domain class:
class Word {
Map translations
String toString(){
id
}
}
And code in BootStrap:
def word1 = new Word(translations: [en:"game"]); word1.save(failOnError: true, flush: true) def word2 = new Word(translations: [en:"life"]); word2.save(failOnError: true, flush: true) def word3 = new Word(translations: [en:"gate"]); word3.save(failOnError: true, flush: true) def word4 = new Word().with { translations = [ en:'time' ] ; save( failOnError:true, flush:true ) } println Word.get(word3.id).translations println Word.get(word4.id).translations
And have the following output:
[:] [en:time]
Obviously it's a bug.
I don't think this is related to .save() or to persistence. I think it is a data binding issue.
I will look into it.