In Jmix, each entity belongs to a single data store (main by default).
So when you load an entity using DataManager (which is used also by loader
in view XML), it requests the data store of the entity. No other indication is needed, the entity is stored in the well known data store.
The only case when you need (and can) specify a store when working through DataManager, is when you load KeyValue entities. There is store("storeName")
method in the fluent loading API and store="storeName"
attribute of the keyValueCollection
or keyValueInstance
loader.
If you have identical tables in different data stores, you still need to map them to different entities (even if they differ only by the @Store()
annotation) to work with them through DataManager.