I have an entity Product and inside of entity, i have Contry entity.
When i execute Product.find or Product.get and get country value, my country values has just id value, but in country entity i have id, name and code [id: 1, code:null, name:null], but this situation is intermittently, 99% of time the values are loaded [id:1, code: XXX, name:YYYYY].
I thing this is a cache problem, but i don´t simulate in developer environment, just in production
My Contry domain :
class Country implements Serializable {
private static final long serialVersionUID = 1
def i18NService
String name
String code
static mapping = {
cache true
}
Country(String code, String name) {
this()
this.name = name
this.code = code
}
This is a grails/hibernate cache bug? How i simulate this situation?