I got this exception while executing a HQL query using hibernate template.
query is:
select * from customer where id = :id
and calling find() method.
hibernate.find(mysql, new Object[]{123})
If executing the query like namedQuery or createQuery this will be fine.
Since it is executing directly the query should be like this (? instead of parameter name)
select * from customer wher id = ?
Comments
Post a Comment