Joined: Mon Dec 05, 2005 5:34 pm Posts: 3 Location: Cincinnati, OH
|
I need to query an object based on a numeric field that is inherited from a super class. The database field is numeric as well, but I am allowing wildcard searches (eg Expression.like()). My solution so far has been to cast the database field to varchar and then I can do the query for these type of properties.
My two approaches have been HQL and the Criteria query.
I feel like neither of these will work:
1) HQL won't work because it doesn't allow me the ability to cast a numeric database field to char to allow wildcards, although I have no problem accessing the property.
2) SQL expressions in Criteria allow me the ability to cast the field, but I don't have the table alias available on the super class.
Any ideas? Thanks.
|
|