• Post Reply Bookmark Topic Watch Topic
  • New Topic

parametric query with in clause

 
manish Bit
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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.
 
Max Vandenburg
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • 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)
 
BWA HA HA HA HA HA HA! Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!