Skip to content

Issues with objects from more than one relationship in ERRest #262

@pascalrobert

Description

@pascalrobert

In a project I'm working on with other people, we found an unexpected behavior with filters. If the response have two relationships that points to the same objects, but they are not filtered with the same attributes, the same filter will apply to both.

Example:

ERXKeyFilter showFilter = ERXKeyFilter.filterWithNone();
showFilter.include(User.PARTY.dot(Party.PRODUCTS)).includeAttributes() ; showFilter.include(User.PARTY.dot(Party.CLIENTTIER).dot(Clienttier.CLIENTTIER_SPREADS).dot(ClienttierSpread.PRODUCTS).dot(Product.PRODUCT_NAME));

In the response, for User.PARTY.dot(Party.PRODUCTS)).includeAttributes(), only the product name will be displayed because of the other filter (ClienttierSpread.PRODUCTS).dot(Product.PRODUCT_NAME)). If a product inside party.products don't exist in clienttierSpread.products, all attributes will be show, the "problem" only occurs if a product is in both relationships.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions