olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bolz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OLINGO-1147) Entity read is not working due to normalization in JPAQueryBuilder
Date Wed, 12 Jul 2017 04:41:00 GMT

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

Michael Bolz commented on OLINGO-1147:

I currently do not have the time for a deep lock into the issue.
However after a quick look into the code a solution could be to remove such property value
parts like the {{‘ENTITY_NAME.1.2’}} before the normalisation needed check.
Then we do the check on the query with removed parameter and if it is still true proceed the
normalisation with the full query.

Regards, Michael

> Entity read is not working due to normalization in JPAQueryBuilder
> ------------------------------------------------------------------
>                 Key: OLINGO-1147
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1147
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.8
>            Reporter: Daniel Horvath
>            Priority: Blocker
> Hello Colleagues,
> We have found a bug in JPAQueryBuilder. In version 2.0.7 it is working fine but in version
2.0.8 where the normalizeMembers() method is added it fails on certain queries.
> The error happens in line 180: {color:red}return em.createQuery(normalizeMembers(jpqlStatement.toString()));{color}
> The query before normalisation:
> *SELECT E1 FROM Entity E1 WHERE E1.id = 'ENTITY_NAME.1.2'*
> After the normalisation the query looks like this (an invalid query):
> The regular expression finds this query as it should be normalised because of the id
part ('ENTITY_NAME.1.2'). As we found out, this is caused by the point characters in the id
field. It should not be found by the reg. exp. because this is inside of apostrophes.
> If you have further questions, please contact me.
> Best regards,
> Daniel

This message was sent by Atlassian JIRA

View raw message