Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.2
Based on my current case, we wanna to encrypt some fields in DB2 using DB2's encryption method, the SQL I should use is likes below:
create table emp (ssn varchar(124) for bit data);
set encryption password = 'Ben123';
insert into emp (ssn) values(encrypt('289-46-8832'));
insert into emp (ssn) values(encrypt('222-46-1904'));
insert into emp (ssn) values(encrypt('765-23-3221'));
select decrypt_char(ssn) from emp;
And then, when we are construct the mapping in Hibernate, we want the Hibernate to complete the work on appending encrypt/decrypt before the ssn in SQL likes before. What can I select/insert/update the emp object from Hibernate for this kind of records?
Anybody can help me?