[hibernate-issues] [Hibernate-JIRA] Resolved: (EJB-82) Query interface should support parameter lists for positions

Emmanuel Bernard (JIRA) noreply at atlassian.com
Tue Aug 29 00:24:26 EDT 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-82?page=all ]
     
Emmanuel Bernard resolved EJB-82:
---------------------------------

    Fix Version: 3.2.0.cr2
     Resolution: Fixed
      Assign To: Emmanuel Bernard

> Query interface should support parameter lists for positions
> ------------------------------------------------------------
>
>          Key: EJB-82
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-82
>      Project: Hibernate Entity Manager
>         Type: Improvement

>   Components: EntityManager
>     Versions: 3.1beta5
>  Environment: jboss 4.0.3 SP1, hibernate-entitymanager-3.1beta5, hibernate-3.1, hibernate-annotations-3.1beta7
>     Reporter: Maxim Wirt
>     Assignee: Emmanuel Bernard
>     Priority: Minor
>      Fix For: 3.2.0.cr2

>
>
> //Client.java
> @Entity
> public class Client implements Serializable {
>   @Id
>   private Long id;
> }
> // ClientDAO
> ...
> public Collection<Client> fetchByIds(Collection<Long> ids) {
>   return em.createQuery("select c from Client c where c.id in(?1)").
>       setParameter(1, ids).
>       getResultList();
> }
> ...
> When I run fetchByIds(), I get:
> [org.hibernate.type.LongType] could not bind value '[420, 15, 223, 516, 641, 637, 748, 372, 33, 379]' to parameter: 1
> The same result if I use
> c.id = ANY(?1)

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