[
https://issues.apache.org/jira/browse/OLINGO-1533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Grigorii Mirsaitov updated OLINGO-1533:
---------------------------------------
Description:
Entity LearningJournals has field IndividualProgramReason (enum type)
*URL Request:*
Unsuccessful:
{code:java}
/LearningJournals?$top=5&$filter=toupper(IndividualProgramReason) eq
'EDUCATION'{code}
doesn't work
"OData - JPA Runtime: JPA query syntax is not correct"
Successful:
{code:java}
/LearningJournals?$top=5&$filter=startswith(toupper(IndividualProgramReason),'EDUCATION')
{code}
{code:java}
/LearningJournals?$top=5&$filter=startswith(IndividualProgramReason, 'ED')
{code}
After research of problem I found:
{code:java}
?$filter=toupper(IndividualProgramReason) eq 'EDUCATION'
{code}
parameter EDUCATION has type String. It is conflict of type of field (enun
type) and parameter (string)
{code:java}
?$filter=IndividualProgramReason eq 'EDUCATION'
{code}
parameter EDUCATION has type Enum. No conflict.
was:
Entity LearningJournals has field IndividualProgramReason (enum __ type)
*URL Request:*
Unsuccessful:
{code:java}
/LearningJournals?$top=5&$filter=toupper(IndividualProgramReason) eq
'EDUCATION'{code}
doesn't work
"OData - JPA Runtime: JPA query syntax is not correct"
Successful:
{code:java}
/LearningJournals?$top=5&$filter=startswith(toupper(IndividualProgramReason),'EDUCATION')
{code}
{code:java}
/LearningJournals?$top=5&$filter=startswith(IndividualProgramReason, 'ED')
{code}
After research of problem I found:
{code:java}
?$filter=toupper(IndividualProgramReason) eq 'EDUCATION'
{code}
parameter EDUCATION has type String. It is conflict of type of field (enun
type) and parameter (string)
{code:java}
?$filter=IndividualProgramReason eq 'EDUCATION'
{code}
parameter EDUCATION has type Enum. No conflict.
> Invalid behavior of toupper function
> ------------------------------------
>
> Key: OLINGO-1533
> URL: https://issues.apache.org/jira/browse/OLINGO-1533
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.11
> Reporter: Grigorii Mirsaitov
> Priority: Minor
>
> Entity LearningJournals has field IndividualProgramReason (enum type)
> *URL Request:*
> Unsuccessful:
> {code:java}
> /LearningJournals?$top=5&$filter=toupper(IndividualProgramReason) eq
> 'EDUCATION'{code}
> doesn't work
> "OData - JPA Runtime: JPA query syntax is not correct"
>
> Successful:
> {code:java}
> /LearningJournals?$top=5&$filter=startswith(toupper(IndividualProgramReason),'EDUCATION')
> {code}
> {code:java}
> /LearningJournals?$top=5&$filter=startswith(IndividualProgramReason, 'ED')
> {code}
> After research of problem I found:
> {code:java}
> ?$filter=toupper(IndividualProgramReason) eq 'EDUCATION'
> {code}
> parameter EDUCATION has type String. It is conflict of type of field (enun
> type) and parameter (string)
>
> {code:java}
> ?$filter=IndividualProgramReason eq 'EDUCATION'
> {code}
> parameter EDUCATION has type Enum. No conflict.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)