we mentioned that when you use the Jmix studio designer to view entities with transient properties the designer removes the javax.persistence.Transient annotation from all transient properties.
Further we mentioned that the designer removes the store name from the io.jmix.core.metamodel.annotation.Store annoation if the entity is part of a different data store.
Have we done something wrong or don’t we need these annotations?
This is strange. @Transient annotations can be perfectly valid, as well as @Store(name = "foo"), and designer should not remove them. Could you give us the steps to reproduce?
Also, are you using the latest Studio 1.2.1?
I’m a team member of @buchholz . It happens when opening an entity in text mode, switch to designer mode and going back to text mode. I just added a column in designer mode, but the behavior also occurs when not even modifying something in designer mode, just going back and forth.
We are using idea 2022.1 Community and Ultimate edition. It happens in both editions. And yes, we are using Jmix plugin version 1.2.1-213.
We run some test on multiple projects/addon-projects with entitites in different databases and a @transient annotations.
Unfortunately, we were not able to reproduce the problem.
Could you please send us a small sample project along with reproduction scenario?
It would help us a lot with figuring out the rootcause.
I noticed this behavior also. I created my entities with Jmix 1.0 or 1.1 and annotated many attributes with both @Transient and @JmixProperty. When I open one of those entities in Jmix 1.2 and switch to designer view, the @Transient annotations are removed.
The documentation’s Entities page shows an example with both annotations so I’m not sure why this is happening.
It seems that you are using @Transient annotation on DTO entities and 1.0 jmix version by default?
If thats the case - please note that:
DTO stands fro Data Transfer Objects. DTOs have no need for @Transient annotation as they are entities that exist only in memory or are mapped to some external data using mechanisms different from JPA .
For the same reason we removed the ability to add @Transient from designer tab to DTO entities in jmix version 1.1 and higher - as it was considered a deprecated feature.
If you have any further questions - please feel free to ask them on our forums.
If you need additional details - here is the link to our 1.2 version jmix documentation on entities.