views:

682

answers:

0

I have the domain classes:

class Person {
    static hasMany = [ items: Item ]
    static fetchMode = [ items: 'eager'  ]
    String name
    Set items
}
class Item {
    static belongsTo = [ owner: Person ]
    String name
}

If I leave static fetchMode = [ items: 'eager' ] in place, then calling getItems() only returns about 10% of the items. If I remove the fetchMode, then getItems() returns all the items. Any idea why eager fetch results in retrieving less than all the stored data?

Edit: Looks like this is a bug in Grails 1.0.4 according to the mailing list [email protected]