[
https://issues.apache.org/jira/browse/OLINGO-897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacek Sputowski updated OLINGO-897:
-----------------------------------
Priority: Critical (was: Blocker)
> Cannot filter on derived properties - startTypeFilter in MemberImpl is ignored
> ------------------------------------------------------------------------------
>
> Key: OLINGO-897
> URL: https://issues.apache.org/jira/browse/OLINGO-897
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Reporter: Jacek Sputowski
> Priority: Critical
>
> According to [Addressing Derived
> Types|http://docs.oasis-open.org/odata/odata/v4.0/cs01/part2-url-conventions/odata-v4.0-cs01-part2-url-conventions.html#_Toc365046429]
> user should be able to filter on derived field
> Example:
> http://host/service/Customers?$filter=Model.VipCustomer/PercentageOfVipPromotionProductsOrdered
> gt 80
> Information about type (e.g. Model.VipCustomer) is stored in field
> *startTypeFilter*(in MemberImpl), but it is not passed to ExpressionVisitor
> in *accept* method. ExpressionVisitor get only path. startTypeFilter is
> ignored, so it can't be used in *visitMember* method.
> Suggested changes (please verify):
> * in org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor
> {code:java}
> T visitMember(Member member) throws ExpressionVisitException,
> ODataApplicationException;
> //current version: T visitMember(UriInfoResource member) throws
> ExpressionVisitException, ODataApplicationException;
> {code}
> * in org.apache.olingo.server.core.uri.queryoption.expression.MemberImpl
> {code:java}
> @Override
> public <T> T accept(final ExpressionVisitor<T> visitor) throws
> ExpressionVisitException, ODataApplicationException {
> return visitor.visitMember(this);
> //current version: return visitor.visitMember(path);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)