eraskin
(Eric Raskin)
April 19, 2022, 5:12pm
#1
I just tried to migrate my first Cuba application to Jmix. I have entities that used BaseStringIdEntity, but that seems to be missing from the Cuba compatibility code.
Is there a different workaround or can you add it?
import com.haulmont.cuba.core.entity.BaseStringIdEntity
albudarov
(Alexander Budarov)
April 25, 2022, 7:34am
#2
Hi,
Please use Jmix forum for Jmix-related questions: https://forum.jmix.io/
In your case, there is no BaseStringIdEntity in Jmix. You should move String id attribute directly to your entity.
eraskin
(Eric Raskin)
April 25, 2022, 1:21pm
#3
Sorry about that. I thought I did post it in the Jmix forums. Just to confirm, you say I should just do this?
@JmixEntity
@Table(name = 'MYENTITIES')
@Entity
public class myEntity {
@Id
private String myId;
public String getId() { return myId; }
public void setId(String id) { this.myId = id; }
/* the rest of the entity */
}
As simple as that? There’s no other magic inside the Cuba compatibility base classes?
albudarov
(Alexander Budarov)
April 25, 2022, 2:11pm
#4
Yes, no magic needed anymore (in CUBA it was needed because of serialization between web and core layers).