Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Filter component should allow filtering by references to entities from other data stores #636

Closed
knstvk opened this issue Aug 25, 2021 · 1 comment
Assignees
Milestone

Comments

@knstvk
Copy link
Contributor

knstvk commented Aug 25, 2021

Now the filter doesn't show in "Add condition" dialog attributes which are references to entities from other data stores.


Changes

Now Filter can perform filtering by property that is association with entity from another DataStore.

For instance, we have the following stores and entities:

  • "first" store: GuestInfo entity
  • "second" store: Person entity

GuestInfo has Person property with single value cardinality. The code of GuestInfo:

@JmixEntity
@Table(name = "GUEST_INFO")
@Entity(name = "master_GuestInfo")
public class GuestInfo {
    @JmixGeneratedValue
    @Column(name = "ID", nullable = false)
    @Id
    private UUID id;
    
    @SystemLevel
    @Column(name = "PERSON_ID")
    private UUID personId;

    @DependsOnProperties({"personId"})
    @JmixProperty
    @Transient
    private Person person;
    
    // other fields
    
    // getters and setters

For the GuestInfo entity will able to show the Person attribute in conditions:

image

Limitations

Filter with KeyValueEntity does not support this functionality and won't show such properties in the UI.

QA

Download demo project: demo.zip

  1. Check that property is shown in "Add condition" dialog and in the Add condition -> Create -> Create Property Condition dialog. Try to filter by this property.
  2. Check that property is not shown for the KeyValueEntity.
@knstvk knstvk added this to the 1.1.0 milestone Aug 25, 2021
Flaurite added a commit to jmix-projects/jmix-dynattr that referenced this issue Sep 20, 2021
Flaurite added a commit to jmix-projects/jmix-data that referenced this issue Sep 20, 2021
Flaurite added a commit that referenced this issue Sep 20, 2021
Flaurite added a commit to jmix-projects/jmix-dynattr that referenced this issue Sep 20, 2021
Flaurite added a commit to jmix-projects/jmix-data that referenced this issue Sep 20, 2021
@maistrenkoIulia
Copy link

verifid

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants