Joined: Fri Nov 21, 2008 3:35 pm Posts: 12
|
I need to search through my database for values that have a property that contains an input value. I've been looking through the HQL and Criterion API's and I can't really find anything that meets what I'm looking for.
I basically want to achieve this result:
for (User user : userList) {
if (user.getName().indexOf(value) != -1) addUserToResultList(user);
}
Or this result, pseudo-code in SQL:
SELECT * FROM user WHERE user.name contains(myValue);
Is this possible with Hibernate or do I need to do it in Java?
|
|