groovy中多行sql书写

来源:互联网 发布:java trim函数 编辑:程序博客网 时间:2024/05/18 04:01
def results = my.Goods.findAll("""\from Goods as g \                              where g.title = ?""", ['title'])

must be \ ,not be \

def fa = my.Goods.findAll("from Goods as g where g.title = ?",['title'])       //after the field of "from" is class namedef que = my.Goods.executeQuery("from Goods g where g.title = ?",['title'])

这里写图片描述

0 0