[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4966) Entity Manager bug with ParameterExpressionImpl

jean-claude cote (JIRA) noreply at atlassian.com
Wed May 5 06:37:06 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=36907#action_36907 ] 

jean-claude cote commented on HHH-4966:
---------------------------------------

the problem is still in 3.5.1 final. I will attach my patch and a testcase. The problem is easy to reproduce just create a parameter and use it twice in your criteria. You'll see it will generate two bind variables :generatedParam0 and :generatedParam1

> 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
>            Reporter: jean-claude cote
>
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list