简体   繁体   中英

How to select multiple values from Database using Hibernate IN key word?

I have Sample applicaion Flex+Java(using mysql database). Actually i'm sending search result from flex to java method it is working one value.

for ex: we are giving flex textbox value---- "java" ------it is working fine 

but we are giving more then two keywords forex: java,flex ----it is not working

Here is mysql query:

from Course where coursename in (:name)

and setting parameter....

将字符串“ java,flex”转换为一个集合,例如使用split(','),然后将其提供给查询。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM