I read through the Hibernate Introduction chapter today (ok - I skimmed throught it) but couldnt find any answers to my questions there, nor in the FAQ. Im a newcomer to Hibernate and trying to finish off what someone started I have a mapping file as below for a User (a bit stripped down for clarity).
PROBLEM -------- My problem lies with the password field. I have an existing database of users who had their passwords encrypted using the mySql encode() function. So basically I wish to write a bit of SQL to run MYsQL'S decode() function for the password fetching.
Is there a way of instructing hibernate to run the native MySQL function for the password field, or do I have to write the whole SELECT in the mapping file?
The DAO is making use of a Criteria implementation: