• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

parametric query with in clause

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a normal query with IN clause, to which i want to convert into a parametric query. I am using Hibernate.

i have an String array, "actorIdArr" and a Long type "iterID";
My query is:-

from UseCaseTaskEntity as en where en.useCaseEntity.iterationEntity.IterationID = iterID"
+ " and en.OwnerEntity.ProjectActorID in ( actorIdArr)";

I dont know how to convert it into parametric query. please help me.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

from UseCaseTaskEntity as en where en.useCaseEntity.iterationEntity.IterationID = iterID"
+ " and en.OwnerEntity.ProjectActorID in ( actorIdArr)";



SELECT o FROM Entity o
WHERE o.attribute1 = :id
AND o.attribute2 IN (:setOfAttributes)
 
The first person to drink cow's milk. That started off as a dare from this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic