Hi,
I am creating custom data store (for handling of DTO entities) according to the documentation:
https://docs.jmix.io/jmix/data-model/data-stores.html#custom
- Created data store implementation itself:
@Component("microstreamDataStore") @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class MicrostreamDataStore implements DataStore { ... }
- Created data store descriptor implementation:
@Component("microstreamDataStoreDescriptor") public class MicrostreamDataStoreDescriptor implements StoreDescriptor { @Override public String getBeanName() { return "microstreamDataStore"; } @Override public boolean isJpa() { return false; } }
-
Added application property:
jmix.core.additional-stores = microstream
-
Added application property:
jmix.core.store-descriptor_microstream = microstreamDataStoreDescriptor
-
Added @Store annotation to the DTO entity (in Text mode of entity designer in Studio):
@Store(name = "microstream") @JmixEntity public class Tick { @JmixGeneratedValue @JmixId private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } }
- And now is interesting point. If I am switching from Text to Designer mode in entity designer and back, the entity looks like that (name attribute of the @Store annotation is removed):
@Store @JmixEntity public class Tick { @JmixGeneratedValue @JmixId private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } }
- If I do the switching again, the entity looks like that (the @Store annotation is removed completely):
@JmixEntity public class Tick { @JmixGeneratedValue @JmixId private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } }
Should it be considered as Studio bug (I am using the version 1.2) and if yes, is there any workaround for that?
Thank you.