如果你需要将查询分割到多行你可以使用一个行连接符:def results = Book.findAll("\
from Book as b, \
Author as a \
where b.author = a and a.surname = ?", ['Smith'])
Groovy 的多行字符串对HQL查询无效。
如果你需要将查询分割到多行你可以使用一个行连接符:def results = Book.findAll("\
from Book as b, \
Author as a \
where b.author = a and a.surname = ?", ['Smith'])
Groovy 的多行字符串对HQL查询无效。