I have two Domains:
Chapter
and
Book
static hasMany = [chapters: Chapter]
I want to make request Book.findAll()
and use it into gsp
with nested objects, as book.chapters
I used option static [mapping = chapters lazy: false]
, but with application.logSql = true
I see many queries select * from chapter where book_id = ?
Is any way to avoid multiple requests?