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 Ho (JIRA)" <ji...@apache.org> on 2016/10/04 01:27:20 UTC

[jira] [Commented] (OLINGO-1029) Read Entity with one of the key being a string will fail when the value contains a period

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

Michael Ho commented on OLINGO-1029:
------------------------------------

Assuming a user is identified by an Id (long) and the Email (string)

/Users(Id=1L,Email='first.last@abc.com')

This will result in JPA query syntax error as mentioned. If I take out the period within the string literal, it will work.

> Read Entity with one of the key being a string will fail when the value contains a period
> -----------------------------------------------------------------------------------------
>
>                 Key: OLINGO-1029
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1029
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.7
>         Environment: Java web application using Olingo v2.0.7
>            Reporter: Michael Ho
>            Priority: Critical
>
> When upgrade from 2.0.6 to 2.0.7 we encountered a bug. When attempt to read an entity specifying the keys, it will fail with the following:
> <message xml:lang="en">"OData - JPA Runtime: JPA query syntax is not correct"</message>
> One of the keys is a string with the value has a period: "first.last@abc.com"
> If the period is not part of the value, no error is generated.
> By tracing the code, it seems that we are treating the string literal as a member and attempt to "normalize" it, treating the period as part of an alias syntax. As a result, it generates an illegal statement.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)