• 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
Hello,
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?

Thanks

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic