• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to pass a collection to 'IN' parameter in native query

hildich kilal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to pass a collection of Long (or String) as a bind parameter to a Hibernate native query. Can i directly set the List<Long> to that parameter?
I know in JPA this is allowed. I can simply do some thing like

Can we also do some thing similar in Native query? Or shall I need to create a comma separated string from List and append it in query?


What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!