Warning - cannot be null

Hello, I am having problems with the Entity Inspector. I have created an entity named ESCUELA with two fields: rbd and name. Both are required. When I go to entity inspector for escuela, these two fields are shown, as expected but when I press save I get an error. It’s in Spanish but it means “warning , cannot be null” .
Screenshot 2025-07-10 at 8.06.59 PM

Any ideas?

@JmixEntity
@Table(name = “ESCUELA”)
@Entity
public class Escuela {
@JmixGeneratedValue
@Column(name = “ID”, nullable = false)
@Id
private UUID id;

@Column(name = "VERSION", nullable = false)
@Version
private Integer version;

@CreatedBy
@Column(name = "CREATED_BY")
private String createdBy;

@CreatedDate
@Column(name = "CREATED_DATE")
private OffsetDateTime createdDate;

@LastModifiedBy
@Column(name = "LAST_MODIFIED_BY")
private String lastModifiedBy;

@LastModifiedDate
@Column(name = "LAST_MODIFIED_DATE")
private OffsetDateTime lastModifiedDate;

@DeletedBy
@Column(name = "DELETED_BY")
private String deletedBy;

@DeletedDate
@Column(name = "DELETED_DATE")
private OffsetDateTime deletedDate;

@Column(name = "RBD", nullable = false, length = 7)
@NotNull
private String rbd;

@InstanceName
@Column(name = "NOMBRE", nullable = false)
@NotNull
private String nombre;

public String getNombre() {
    return nombre;
}

public void setNombre(String nombre) {
    this.nombre = nombre;
}

public String getRbd() {
    return rbd;
}

public void setRbd(String rbd) {
    this.rbd = rbd;
}

public OffsetDateTime getDeletedDate() {
    return deletedDate;
}

public void setDeletedDate(OffsetDateTime deletedDate) {
    this.deletedDate = deletedDate;
}

public String getDeletedBy() {
    return deletedBy;
}

public void setDeletedBy(String deletedBy) {
    this.deletedBy = deletedBy;
}

public OffsetDateTime getLastModifiedDate() {
    return lastModifiedDate;
}

public void setLastModifiedDate(OffsetDateTime lastModifiedDate) {
    this.lastModifiedDate = lastModifiedDate;
}

public String getLastModifiedBy() {
    return lastModifiedBy;
}

public void setLastModifiedBy(String lastModifiedBy) {
    this.lastModifiedBy = lastModifiedBy;
}

public OffsetDateTime getCreatedDate() {
    return createdDate;
}

public void setCreatedDate(OffsetDateTime createdDate) {
    this.createdDate = createdDate;
}

public String getCreatedBy() {
    return createdBy;
}

public void setCreatedBy(String createdBy) {
    this.createdBy = createdBy;
}

public Integer getVersion() {
    return version;
}

public void setVersion(Integer version) {
    this.version = version;
}

public UUID getId() {
    return id;
}

public void setId(UUID id) {
    this.id = id;
}

update: So I re created the entity only with id, rbd and name and same error from Entity Inspector:

@JmixEntity
@Table(name = “ESCUELA”)
@Entity
public class Escuela {
@JmixGeneratedValue
@Column(name = “ID”, nullable = false)
@Id
private UUID id;

@Column(name = "RBD", nullable = false, length = 7)
@NotNull
private String rbd;

@InstanceName
@Column(name = "NOMBRE", nullable = false)
@NotNull
private String nombre;

public String getNombre() {
    return nombre;
}

public void setNombre(String nombre) {
    this.nombre = nombre;
}

public String getRbd() {
    return rbd;
}

public void setRbd(String rbd) {
    this.rbd = rbd;
}

public UUID getId() {
    return id;
}

public void setId(UUID id) {
    this.id = id;
}

}

EDIT 2: When I disable MANDATORY for both fields it works and no more errors. In both scenarios I made sure data was entered in both fields so I am still wondering why this happens.

Hi!

Unfortunately, I can’t reproduce your problem.

There is the code for my TestEntity entity:

@JmixEntity
@Table(name = "TEST_ENTITY")
@Entity
public class TestEntity {
    @JmixGeneratedValue
    @Column(name = "ID", nullable = false)
    @Id
    private UUID id;

    @NotNull
    @InstanceName
    @Column(name = "NAME", nullable = false)
    private String name;

    @NotNull
    @Column(name = "TEST_PROPERTY", nullable = false, length = 7)
    private String testProperty;

    public String getTestProperty() {
        return testProperty;
    }

    public void setTestProperty(String testProperty) {
        this.testProperty = testProperty;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public UUID getId() {
        return id;
    }

    public void setId(UUID id) {
        this.id = id;
    }

}

I can save my entity without any warnings:
Screen Recording 2025-07-11 at 10.15.43

Could you please provide a small test project that reproduces the problem?

Best regards,
Dmitriy