Let’s say we have a User
@Entity
class User {
String name;
…
ExternalSystemObject eso;
…
}
Is there an easy way to store the ExternalSystemObject as it’s identifier only (e.g. a column eso_id: String for example) and provide a mapper to map the ID back to an object when retrieving the data?
Obviously I can define the field as String in the model but that would involve creating another object to represent the original required data model.
I thought that is a simple commonly desired behaviour but couldn’t find anything in the documentation.