You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2017/03/23 20:17:41 UTC

[jira] [Comment Edited] (OLINGO-1095) JPAQueryBuilder.normalizeMembers encounters issue when EmbedId

    [ https://issues.apache.org/jira/browse/OLINGO-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15939080#comment-15939080 ] 

Michael Bolz edited comment on OLINGO-1095 at 3/23/17 8:16 PM:
---------------------------------------------------------------

Hi [~evildracula],

I will take a look into.

The problem seems that the normalization necessary for the navigation property (OLINGO-414) must not be done for the embedded key case.

Sample: http://localhost:8080/SalesOrderProcessing.svc/SalesOrderLineItems(liId=10L,soId=2L)
Correct (not normalised):
{code}
SELECT E1 FROM SalesOrderItem E1 WHERE E1.salesOrderItemKey.liId = 10L AND E1.salesOrderItemKey.soId = 2L
{code}

Not correct (normalised):
{code}
SELECT DISTINCT E1 FROM SalesOrderItem E1 JOIN E1.salesOrderItemKey R1 WHERE R1.liId = 10L AND R1.soId = 2L
{code}

Another failing request: http://localhost:8080/SalesOrderProcessing.svc/Stores?$filter=storeAddress/country%20eq%20%27USA%27


was (Author: mirbo):
Hi [~evildracula],

I will take a look into.

The problem seems that the normalization necessary for the navigation property (OLINGO-414) must not be done for the embedded key case.

Sample: http://localhost:8080/SalesOrderProcessing.svc/SalesOrderLineItems(liId=10L,soId=2L)
Correct (not normalised):
{code}
SELECT E1 FROM SalesOrderItem E1 WHERE E1.salesOrderItemKey.liId = 10L AND E1.salesOrderItemKey.soId = 2L
{code}

Not correct (normalised):
{code}
SELECT DISTINCT E1 FROM SalesOrderItem E1 JOIN E1.salesOrderItemKey R1 WHERE R1.liId = 10L AND R1.soId = 2L
{code}

> JPAQueryBuilder.normalizeMembers encounters issue when EmbedId
> --------------------------------------------------------------
>
>                 Key: OLINGO-1095
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1095
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.8
>            Reporter: evildracula
>            Assignee: Michael Bolz
>
> org.apache.olingo.odata2.jpa.processor.core.access.data.JPAQueryBuilder
> normalizeMembers failed to process EmbedKeyId when JPA query is:
> SELECT E1 FROM EndUser E1 WHERE E1.id.pid= 'T001' AND E1.id.rid= 'E001'
> the normalized query will be:
> SELECT DISTINCT E1 FROM EndUser E1 JOIN E1.id R1 WHERE R1.pid = 'T001' AND R1.rid = 'E001'
> |This will cause problem when validated by boolean org.eclipse.persistence.jpa.jpql.AbstractSemanticValidator.validateCollectionValuedPathExpression(Expression expression, boolean collectionTypeOnly)|



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)