]
Marcus Brito updated HHH-2903:
------------------------------
Attachment: report-wrong-parameter-v2.diff
Here's a new version that also catches HibernateExceptions thrown during parameter
binding, and a slightly expanded test suite.
Friendlier error messages for wrong parameter types in HQL queries
------------------------------------------------------------------
Key: HHH-2903
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2903
Project: Hibernate3
Issue Type: Patch
Components: core
Affects Versions: 3.2.5
Reporter: Marcus Brito
Attachments: report-wrong-parameter-type-test.diff,
report-wrong-parameter-type.diff, report-wrong-parameter-v2.diff
The attached patch modifies NamedParameterSpecification and
PositionalParameterSpecification to catch any ClassCastExceptions thrown while binding
parameters, and rethrow them as QueryParameterExceptions, including a detailed error
message containing the parameter name or position that failed to bind, and the (most
probably) expected type the parameter should have received.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: