New Entity not created properly in 6.10.4

I think I hit a bug in 6.10.4 Platform.

After creating a new Entity, the entity was not visible via the Entity Inspector.
Adding the Entity Browse screen in the menu presented me with a NoSuchScreenException.

Downgrading the platform to 6.10.3 resolved the issue, everything worked again as usual.

Hi,
Could you please share a small project in order to help us investigate the problem. Also, more detailed information about your entity will be helpful

The Entity is rather straightforward as you can see below, just one field, no association.

I created another TestEntity to test if there was a problem with this entity, But the problem with the Test Entity was exactly the same. The problems that I faced:

  • The entity did not appear in the Entity Inspector
  • Adding the Browse screen to the menu was not possible with a NoSuchScreen exception.

After downgrading to 6.10.3, everything worked immediately. So I expect an issue with 6.10.4

package com.company.idm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.haulmont.chile.core.annotations.NamePattern;
import com.haulmont.cuba.core.entity.StandardEntity;

@NamePattern("%s|description")
@Table(name = "IDM_CSS_OVERRIDE_FILE")
@Entity(name = "idm$CssOverrideFile")
public class CssOverrideFile extends StandardEntity {
    private static final long serialVersionUID = 2202505925157658612L;

    @Column(name = "FILE_NAME")
    protected String fileName;


    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileName() {
        return fileName;
    }
}

The Browse XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
        caption="msg://browseCaption"
        class="com.company.idm.web.cssoverridefile.CssOverrideFileBrowse"
        focusComponent="cssOverrideFilesTable"
        lookupComponent="cssOverrideFilesTable"
        messagesPack="com.company.idm.web.cssoverridefile">
    <dsContext>
        <groupDatasource id="cssOverrideFilesDs"
                         class="com.company.idm.entity.CssOverrideFile"
                         view="_local">
            <query>
                <![CDATA[select e from idm$CssOverrideFile e]]>
            </query>
        </groupDatasource>
    </dsContext>
    <dialogMode height="600"
                width="800"/>
    <layout expand="cssOverrideFilesTable"
            spacing="true">
        <filter id="filter"
                applyTo="cssOverrideFilesTable"
                datasource="cssOverrideFilesDs">
            <properties include=".*"/>
        </filter>
        <groupTable id="cssOverrideFilesTable"
                    width="100%">
            <actions>
                <action id="create"/>
                <action id="edit"/>
                <action id="remove"/>
            </actions>
            <columns>
                <column id="fileName"/>
            </columns>
            <rows datasource="cssOverrideFilesDs"/>
            <rowsCount/>
            <buttonsPanel id="buttonsPanel"
                          alwaysVisible="true">
                <button id="createBtn"
                        action="cssOverrideFilesTable.create"/>
                <button id="editBtn"
                        action="cssOverrideFilesTable.edit"/>
                <button id="removeBtn"
                        action="cssOverrideFilesTable.remove"/>
            </buttonsPanel>
        </groupTable>
    </layout>
</window>

and the Controller

package com.company.idm.web.cssoverridefile;

import com.haulmont.cuba.gui.components.AbstractLookup;

public class CssOverrideFileBrowse extends AbstractLookup {
}

Hi Hans,

I didn’t run your code but there is one thing I see in your entity class.
You reference an attribute ‘description’ in your NamePattern definition which not exists in your class:

I guess this creates an error when creating an instance of this class…

Do you use Studio to create the datamodel entity? This should prevent you do this.

Regards,
Steven