[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 = ?

你可能感兴趣的:(java,Hibernate,OpenSource)