Hibernate HQL IN clause only match first item of list -


the problem : in clause of hql query matches first item of comma separated list!

the hql query : from news 93 in (pictureids)

news entity :

public class news {   string id;   string pictureids; // comma separated list of pictureids } 

note: if change hql query , hardcode pictureids result correct!

how can change query resolve problem?

try this:

from news pictureids '%,93,%' 

commas added start , end.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -