olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Ho (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OLINGO-1184) Expression Parser handles bound functions incorrectly following type filter
Date Mon, 18 Sep 2017 21:49:00 GMT

     [ https://issues.apache.org/jira/browse/OLINGO-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Philip Ho updated OLINGO-1184:
------------------------------
    Description: 
When attempting to filter an entity set via a function that is bound to the subtype of a navigation
property's entity type, the expression parser is confused about which segment holds the bound
function's name and which type the function is bound to.

Example URl
/ESNavSrc?$filter=NavPropertyETNavTarget/Namespace1_Alias.ETBaseBF/Namespace1_Alias.BFETBaseBF()

[^mock_data.png]

The issue is in parseMemberExpression, the wrong fully qualified name was being passed and
the last resource in this case differs from other cases where parseBoundFunction is called.
I've refactored parseBoundFunction's method signature to be more flexible so that in these
cases we can pass in the type filter type instead of the base type.

Patch file for fix with mock data and test:
[^cast-with-bound-function.patch]
Generated relative to 4.5.0 : 8a968923baa03235356feae73e72496890307647



  was:
When attempting to filter an entity set via a function that is bound to the subtype of a navigation
property's entity type, the expression parser is confused about which segment holds the bound
function's name and which type the function is bound to.

Example URl
/ESNavSrc?$filter=NavPropertyETNavTarget/Namespace1_Alias.ETBaseBF/Namespace1_Alias.BFETBaseBF()

!mock_data.png|thumbnail!

The issue is in parseMemberExpression, the wrong fully qualified name was being passed and
the last resource in this case differs from other cases where parseBoundFunction is called.
I've refactored parseBoundFunction's method signature to be more flexible so that in these
cases we can pass in the type filter type instead of the base type.

Patch file for fix with mock data and test:
[^cast-with-bound-function.patch]
Generated relative to 4.5.0 : 8a968923baa03235356feae73e72496890307647




> Expression Parser handles bound functions incorrectly following type filter
> ---------------------------------------------------------------------------
>
>                 Key: OLINGO-1184
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1184
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.5.0
>            Reporter: Philip Ho
>         Attachments: cast-with-bound-function.patch, mock_data.png
>
>
> When attempting to filter an entity set via a function that is bound to the subtype of
a navigation property's entity type, the expression parser is confused about which segment
holds the bound function's name and which type the function is bound to.
> Example URl
> /ESNavSrc?$filter=NavPropertyETNavTarget/Namespace1_Alias.ETBaseBF/Namespace1_Alias.BFETBaseBF()
> [^mock_data.png]
> The issue is in parseMemberExpression, the wrong fully qualified name was being passed
and the last resource in this case differs from other cases where parseBoundFunction is called.
I've refactored parseBoundFunction's method signature to be more flexible so that in these
cases we can pass in the type filter type instead of the base type.
> Patch file for fix with mock data and test:
> [^cast-with-bound-function.patch]
> Generated relative to 4.5.0 : 8a968923baa03235356feae73e72496890307647



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message