Does anyone know how to annotate a class or define in a hbm.xml file, an element that produces a password column- providing for encryption, (using hibernate3.2) similar to writing the following statement in SQL:
and then the following would insert encrypted password:
Thanks!!
The problem i'm having is with the PASSWORD() function. I can't seem to find its equivalent in hibernate or JPA [ May 09, 2007: Message edited by: kwame Iwegbue ]
"password" data type? Which database are you using? Sounds like a vendor-specific data type, if it is I'd keep this out of the mapping (just use a character type and encrypt the text).
In Hibernate you treat functions like they were named queries. Have a read of the docs on named queries for more info.