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

[jira] [Commented] (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=15933955#comment-15933955 ] 

evildracula commented on OLINGO-1095:
-------------------------------------

Hi [~mirbo],

I need your help on this, while using @EmbeddedId and @EdmKey, I got an issue of below, or I should change the way to declare @EmbeddedId and @EdmKey
could you please help me with this? Many thanks.

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)

https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commitdiff;h=3ed58899d76c57ef8a26a3a02098c736f4740856

> 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
>
> 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)