References between entities with compound key from different data stores

I see here (Data Stores - CUBA Platform. Developer’s Manual) that it is possible to make a reference to an entity in different datastores.

The entity that I am trying to reference has a compound key id, and it is in the datastore of an external database that I cannot modify.

Is there any way to make the reference to this entity?

Thanks.

Yes, it’s supported.
The entity with compound key will have the id attribute of an embeddable type. The entity that has a reference to it will have the transient attribute of this embeddable type plus persistent attributes corresponding to all individual attributes of the compound key.

1 Like