groovy中多行sql書寫

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 name
def que = my.Goods.executeQuery("from Goods g where g.title = ?",['title'])

這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章