Hello everyone!
I am new to the hibernate world and I am trying to pull records out of a db (oracle 10) with user input.
Essentially -- SELECT * FROM table WHERE userinput is < rangeOne AND > rangeTwo
The rows for comparison are VARCHAR2. As this is a rather large db, I really do not wish to hit it three times per record to make every compare.
I have tried using:
Code:
criteria.add(Restrictions.ge("rangeOne", userInput);
criteria.add(Restrictions.le("rangeTwo",userInput);
Those however did not yield the results I expected. I expect it is because the fields are alphnumeric.
Do the hibernate criterias offer an easy way to do this?
Any thoughts or suggestions on how this could be done would be great.