views:

34

answers:

1

We are configuring hibernate with grails using the domain classes. Added:

static hasMany = [image:Image]

static fetchMode = [image:"eager"]

However, when I pull the object graph each image is not loaded. Please advise.

Thanks.

A: 

It looks like you using 1.0.x configuration style. Take a look into documentation.

Try

class Collage {
    static hasMany = [image:Image]
    static mapping = {
        image lazy: false
    }
}
amra