Filter doesn't show all the properties of linked entities

Hello,

we’re experiencing a strange behaviour while trying to configure “filter” component in the XML screen descriptor.
According to manual, we tried at first to use the most generic configuration, including all the properties of the referred entity:


<filter id="filter"
    applyTo="caICespitisTable"
    datasource="caICespitisDs">
		<properties include=".*"/>
</filter>

Whe we click on “Add search condition”, the resulting window shows all the properties of the main entity, but lots of properties of the linked entities (ManyToOne and/or OneToOne) are missing.

Next we tried to use a more granular configuration (specifying only three linked entites), like this:


<filter id="filter"
    applyTo="caICespitisTable"
    datasource="caICespitisDs">
       <properties include="(classe*)|(ditta*)|(azienda*)"/>
</filter>

But even in this case, many properties are still missing.
So we tried with another one, expressing only three properties of one linked entity:


<filter id="filter"
    applyTo="caICespitisTable"
    datasource="caICespitisDs">
       <property name="azienda.telefono" caption="Telefono Azienda"/>
        <property name="azienda.fax" caption="Fax Azienda"/>
        <property name="azienda.email" caption="Email Azienda"/>
</filter>

In this case, while the first property is visible, the second and the third ones aren’t visible at all.

This is the datasource definition:


<collectionDatasource id="caICespitisDs"
	class="it.consorziometis.at20.mgca.entity.CaICespiti"
	view="caICespiti-view">

This is an extract of the main entity (CaICespiti):


@EnableRestore
@NamePattern("%s %s %s %s %s %s|azienda,numero,descrizione,classe,ditta,modello")
@DesignSupport("{'imported':true}")
@Table(name = "ca_i_cespiti", uniqueConstraints = {
    @UniqueConstraint(name = "IDX_MGCA_CA_I_CESPITI_UNQ", columnNames = {"NUMERO", "AZIENDA"})
})
@Entity(name = "mgca$CaICespiti")
public class CaICespiti extends BaseUuidEntity {

    @Column(name = "numero", nullable = false)
    protected Long numero;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ditta")
    protected CaCodCivabDitte ditta;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "classe")
    protected CaCodCivabClassi classe;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "azienda")
    protected CaAnagAzienda azienda;

   	//...getter and setter...

}

… and this is one of the linked entity (azienda):


@NamePattern("%s %s|codice,denominazione")
@DesignSupport("{'imported':true}")
@Table(name = "ca_anag_azienda", uniqueConstraints = {
    @UniqueConstraint(name = "IDX_MGCA_CA_ANAG_AZIENDA_UNQ", columnNames = {"CODICE"})
})
@Entity(name = "mgca$CaAnagAzienda")
public class CaAnagAzienda extends StandardEntity {
    private static final long serialVersionUID = 7698933837472225679L;

    @Column(name = "codice", nullable = false, length = 12)
    protected String codice;

    @Column(name = "denominazione", nullable = false)
    protected String denominazione;

    @Column(name = "telefono", length = 50)
    protected String telefono;

    @Column(name = "fax", length = 50)
    protected String fax;

    @Column(name = "email", length = 100)
    protected String email;

	//...getter and setter...
	
}

As you can see the fields “telefono”, “fax”, “email” are similar (“telefono” and “fax” have the same length too), but strangely only “telefono” is visible…

Did we forget to do something?

FYI: we’re using cuba platform 6.4.0

Thanks in advance and congratulations for your great job.

Sincerily,

Paolo

2 Likes

Hi Paolo,

This bug was fixed in the 6.4.1. Try to update the platform version.

Hi Max,
I’ve upgraded to cuba platform 6.4.1 and now it’s all ok.

Thank you,
Bye,
Paolo