hibernate formula with column

Posted by coolguy on Stack Overflow See other posts from Stack Overflow or by coolguy
Published on 2010-04-30T06:58:45Z Indexed on 2010/04/30 14:17 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

I have a table with a column that will be encrypted by a trigger after the record is inserted. When I read the column, I need to apply a decrypt function in the hibernate domain class.

While saving the object, the value of the column will be saved as such. While reading the column, apply a database function on the read data. @Formula and @Column annotation cannot be applied to an attribute in the entity class. How do I achieve this functionality without using one attribute for saving and another one with @Formula for reading it?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about annotations