-
Notifications
You must be signed in to change notification settings - Fork 165
Description
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.