Map an Entity to multiple data store

Hi,

I have a case where the table(say Student) of additional datastores say A and B has same structure. I have imported entity using generate data model using datastore A.
Now in collection datasource when i mention the store as A, it works fine. But when i use store B. it gives an error:
The abstract schema type ‘app$Student’ is unknown.

I have tried to import it from Store B, at this point I creates a new entity with Student1.
Is there any way i can avoid such multiple entities and map same entity to multiple data store, either via xml configs or Code.

Kindly Help, any suggestion is appreciated.

Regards,
Aruna

Hi Aruna,

Unfortunately, in CUBA it is impossible to map a single entity to multiple data stores. It’s a technical restriction, mostly caused by the fact that entities from different data stores can have references to each other. So there is no way to determine where to load entity from other than the entity type.

Okay, Thanks :slight_smile: