It is possible to tranform the primary key before a join with an hibernate annotation in addition to @JoinColumn
?
For example:
Table Address(id, countryId) : data -> (1, EN), (2, EN), (3, FR) Table Country(ref, label, language) : data -> (EN1, English, InEnglish), (EN2, Anglais, InFrench), (FR1, French, InEnglish), (FR2, Français, InFrench)
Java:
public class Address {
@Id
private Long id;
@OneToOne (with transformation coutryId+"2" to join)
private Country countryInFrench;
}
I don't know if I'm clear, do not hesitate to ask question.