[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3539) Named parameters not recognized in 'order by' section of query - again

Mattias Jiderhamn (JIRA) noreply at atlassian.com
Fri Oct 24 03:36:05 EDT 2008


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

Mattias Jiderhamn commented on HHH-3539:
----------------------------------------

Correction: named parameters not recognized if only present in 'order by' clause. Thought it works if the same parameter is present in where clause also.

Example:
  select foo
  from Foo as foo
  order by foo.bar in (:bars)
does not work

while
  select foo
  from Foo as foo
  where (:bars) is not null
  order by foo.bar in (:bars)
works.

> Named parameters not recognized in 'order by' section of query - again
> ----------------------------------------------------------------------
>
>                 Key: HHH-3539
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3539
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.3.1
>            Reporter: Mattias Jiderhamn
>
> It seems HB-297 has been reintroduced into Hibernate 3. New stacktrace (as of 3.3.1):
> org.hibernate.QueryParameterException: could not locate named parameter [foo]
> 	at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99)
> 	at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105)
> 	at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:437)
> 	at org.hibernate.impl.AbstractQueryImpl.setParameterList(AbstractQueryImpl.java:761)

-- 
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