I was wondering if my idea is possible with hibernate.
What I want is that there is one table with usernames and every table wich has a reference to this table has the username encrypted in a column. So the username doesn't stand in normal text but encrypted in every table which have a reference to the user table.
So I need something like:
@ManyToOne
@JoinColumn(name = "userName", insertable=false, updatable=false, encrypted="md5")
public User getUser(){
return this.user;
}
public void setUser(User user ){
this.user = user;
}
I hope that I make myself clear.