`
SilverRing
  • 浏览: 70817 次
社区版块
存档分类
最新评论

[Hibernate 3] bug about string "call"

阅读更多
Once there's a string "call" involved in an hql, hibernate will throw an exception like the one below:

HibernateSystemException: ordinal parameter mismatch

This is an open bug reported here:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-1423

A simple workaround is to make the 'call' variable the first in the query

before:

from Ship s where s.name = ? and s.callsign = ?


after

 from Ship s where s.callsign = ? and s.name = ?

分享到:
评论
1 楼 weifly 2009-09-14  
这样写也会有bug:
from Ship s where s.name ='call'
改为参数形式就没问题了:
from Ship s where s.name=?

相关推荐

Global site tag (gtag.js) - Google Analytics