Thanks for your help, the Data Model seem fine.
But when I use datamanager to load this entity, I got the following error.
error: no suitable method found for load(Class<E02IssType>)
public E02IssType getTypID(String typid) {
return dataManager.load(E02IssType.class)
.query("e.typid = :typid")
.parameter("typid", typid)
.one();
}
Below please find my Data Model Code
import io.jmix.core.metamodel.annotation.InstanceName;
import io.jmix.core.metamodel.annotation.JmixEntity;
import io.jmix.data.DdlGeneration;
import javax.persistence.*;
import java.util.Date;
@DdlGeneration(value = DdlGeneration.DbScriptGenerationMode.DISABLED)
@JmixEntity
@Table(name = "E02_ISS_TYPE")
@Entity(name = "iccms_E02IssType")
public class E02IssType {
@Column(name = "TYPID", nullable = false, length = 3)
@Id
private String typid;
@Column(name = "CREATE_TS")
@Temporal(TemporalType.TIMESTAMP)
private Date createTs;
@Column(name = "CREATED_BY", length = 50)
private String createdBy;
@InstanceName
@Column(name = "NAME", length = 40)
private String name;
@Column(name = "UPDATE_TS")
@Temporal(TemporalType.TIMESTAMP)
private Date updateTs;
@Column(name = "UPDATED_BY", length = 50)
private String updatedBy;
@Column(name = "VERSION", nullable = false)
private Integer version;
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public Date getUpdateTs() {
return updateTs;
}
public void setUpdateTs(Date updateTs) {
this.updateTs = updateTs;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreateTs() {
return createTs;
}
public void setCreateTs(Date createTs) {
this.createTs = createTs;
}
public String getTypid() {
return typid;
}
public void setTypid(String typid) {
this.typid = typid;
}
}