+1
I actually require this to do something like this:
@Id @OneToOne @ColumnTransformer(write="encrypt", read="decrypt(cryptedid)") @JoinColumnOrFormula(formula=@JoinFormula(value="decrypt(cryptedid)", referencedColumnName="docid")) private Doc doc;