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

2017-04-09 Thread evildracula (JIRA)

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

evildracula commented on OLINGO-1095:
-

Thank you [~mirbo], really appreciate. :)


> 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
> Fix For: V2 2.0.9
>
> Attachments: TypeCastSc1.png, TypeCastSc2.png
>
>
> 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)


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

2017-04-07 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-1095:
--

Okay, then I close this issue and it will be part of the next release.

Thanks again for your contribution and help by this issue.

Wish you a nice time, 
Regards, Michael

> 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
> Fix For: V2 2.0.9
>
> Attachments: TypeCastSc1.png, TypeCastSc2.png
>
>
> 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)


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

2017-04-05 Thread evildracula (JIRA)

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

evildracula commented on OLINGO-1095:
-

Never mind, javac and maven plugin can pass. Looks like the Eclipse compiler 
issue.
When using IntelliJ, it returns error when compiler is eclipse compiler, but no 
error shows when it's javac compiler.

> 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
> Fix For: V2 2.0.9
>
> Attachments: TypeCastSc1.png, TypeCastSc2.png
>
>
> 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)


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

2017-04-05 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-1095:
--

Hi [~evildracula],

I'am really sorry but neither I can re-produce your issue nor can I understand 
the problem of the Eclipse? compiler.
Do you know what Java compiler is used by your Eclipse?

Best regards, Michael

> 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
> Fix For: V2 2.0.9
>
> Attachments: TypeCastSc1.png, TypeCastSc2.png
>
>
> 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)


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

2017-04-02 Thread evildracula (JIRA)

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

evildracula commented on OLINGO-1095:
-

It looks like IDE throws error while maven compile passed.
IDE
!TypeCastSc1.png!

Maven class(decompiled with jad)
!TypeCastSc2.png!

> 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
> Fix For: V2 2.0.9
>
> Attachments: TypeCastSc1.png, TypeCastSc2.png
>
>
> 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)


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

2017-03-31 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-1095:
--

What happens when you build the project with maven on the command line?
Do you have the Oracle JDK or some other?

I tested again with JDK 6/7/8 without any issue and the [Apache 
Jenkins|https://builds.apache.org/view/Olingo/job/olingo-odata2/1332/] also 
have no compiler issue.

> 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
> Fix For: V2 2.0.9
>
>
> 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)


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

2017-03-30 Thread evildracula (JIRA)

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

evildracula commented on OLINGO-1095:
-

The definition is:
Set> getAttributes();
Seeing:
Set> attributes = (Set>) type.getAttributes();
Jdk 8 as compiler in Eclipse shows:
Cannot cast from Set> to Set>

> 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
> Fix For: V2 2.0.9
>
>
> 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)


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

2017-03-30 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-1095:
--

Hi [~evildracula],

what version do you use and what for difficulties do you have?
I compiled/runned it with Java 6 and 8 without a problem.

Regards, Michael

> 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
> Fix For: V2 2.0.9
>
>
> 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)


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

2017-03-27 Thread evildracula (JIRA)

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

evildracula commented on OLINGO-1095:
-

Can you take a look at 
Set> attributes = (Set>) type.getAttributes();
Looks like my version has difficulty to parse.
[code]
public interface ManagedType extends Type {
/**
 * Return the attributes of the managed type.
 *
 * @return attributes of the managed type
 */
Set> getAttributes();
[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
> Fix For: V2 2.0.9
>
>
> 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)


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

2017-03-27 Thread evildracula (JIRA)

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

evildracula commented on OLINGO-1095:
-

Thank you [~mirbo], I will try this today.

> 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
> Fix For: V2 2.0.9
>
>
> 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)


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

2017-03-25 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-1095:
--

Hi [~evildracula],

I added the additional check (see commit [OLINGO-1095 Check for embedded 
attributes|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=2d07b9fa98eb970a9554ca13a6492a568d79a1b0]).

Please give feedback if it solves your issue.

Kind Regards, Michael

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


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

2017-03-23 Thread evildracula (JIRA)

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

evildracula commented on OLINGO-1095:
-

Thank you [~mirbo] :)

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


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

2017-03-23 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-1095:
--

Hi [~evildracula],

Currently IMHO the normalization has to verify (via {{EntityManager}}) that it 
is only done in the to many case (see 
[OLINGO-414|https://issues.apache.org/jira/browse/OLINGO-414?focusedCommentId=15337587&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15337587]).
For the other cases the query MUST NOT be normalised.

I will test my fix and give feedback.

Best Regards, Michael

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


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

2017-03-23 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-1095:
--

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)


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

2017-03-20 Thread evildracula (JIRA)

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