如何修复错误消息。 “记住序数参数是从 1 开始的!”
给定代码片段(请不要问我为什么这样构造它......)
...some more Logic...
def blaParam = ['checkinable':checkinable]
def blaQuery = " AND c.product = :checkinable"
...some more Logic...
,
def paramBox = [] + blaParam
def queryBox = "" + blaQuery
def c = Bla.executeQuery("FROM Bla b WHERE 1 = 1 "+queryBox+" ", paramBox, [max:params.max])
我最终得到一条消息
errors.GrailsExceptionResolver Remember that ordinal parameters are 1-based!
如何防止这种情况?
given the code snippet (please do not ask why I construct it this way...)
...some more Logic...
def blaParam = ['checkinable':checkinable]
def blaQuery = " AND c.product = :checkinable"
...some more Logic...
and
def paramBox = [] + blaParam
def queryBox = "" + blaQuery
def c = Bla.executeQuery("FROM Bla b WHERE 1 = 1 "+queryBox+" ", paramBox, [max:params.max])
I end up with a message
errors.GrailsExceptionResolver Remember that ordinal parameters are 1-based!
How do I prevent this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
合并最后两个参数映射对我有用:
Merging the two last parameter maps worked for me:
如果我改成
它就
可以了
if I change
to
it is working