I have a table, Address, with a couple fields, 'numStart' and 'numEnd'. When a user searches for Addresses he can specify the Street name and optionally, a Number. I would like to do a query like this:
from Address where street.name like ? and and ? between numStart and numEnd
The only problem is that 'numStart' and 'numEnd' are TEXT fields, not numbers. (I inherited the database ...) So HQL chokes. If I run the equivalent SQL query directly in mySql it works, it seems to convert the text field values to numbers on the fly.
Can I do this with HQL?
Thanks,
Bob
|