[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4966?page=c...
]
Steve Ebersole commented on HHH-4966:
-------------------------------------
I actually decided to change the signature of the 2 related methods a bit to make this
more explicit and to encapsulate this some more:
{code}
/**
* Register parameters explicitly encountered in the criteria query.
*
* @param criteriaQueryParameter The parameter expression
*
* @return The JPA-QL parameter name
*/
public String registerExplicitParameter(ParameterExpression<?>
criteriaQueryParameter);
/**
* Register a parameter that was not part of the criteria query (at least not as a
parameter).
*
* @param literal The literal value
* @param javaType The java type as whcih to handle the literal value.
*
* @return The JPA-QL parameter name
*/
public String registerLiteralParameterBinding(Object literal, Class javaType);
{code}
Entity Manager bug with ParameterExpressionImpl
-----------------------------------------------
Key: HHH-4966
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4966
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-CR-1, 3.5.1
Reporter: jean-claude cote
Assignee: Steve Ebersole
Fix For: 3.5.2, 3.6
Emmanuel
There seems to be a bug with the ParameterExpressionImpl class when rendering.
If you create a criteria query using a ParameterExpression instance in
multiple places in your query the rendering of this query will produce
multiple pram0, param1, param2 for the same ParameterExpression
instance.
We fixed this bug by augmenting the RenderingContext interface with
generateParameterName(Expression<?> exp). With this information the
rendering context can give back the same jpaqlParameterName for the
same ParameterExpression instance. All it has to do is do a lookup in
its explicitParamtermapping map.
Thanks
Jean-Claude
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira