[ 
https://issues.apache.org/jira/browse/OLINGO-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Saurav Sahu updated OLINGO-1528:
--------------------------------
    Description: 
Olingo JPA fails for the following query -

$orderby=FreightOrder_Informations/CreationDateTime 
asc&$filter=(EventReportingStatus ne '00' and EventReportingStatus ne '' and 
EventReportingStatus ne '04' and EventReportingStatus ne '10' and 
CurrentEventOrdinalNumber ne 0) and (EventReportingStatus eq '01' or 
EventReportingStatus eq '02' or EventReportingStatus eq '03') and 
(FreightOrder_Informations/CreationDateTime ge '2021-01-06T18:30:00.000Z' and 
FreightOrder_Informations/CreationDateTime le 
'2021-01-07T18:29:59.999Z')&$select=OrderingPartyName,EventReportingStatus,DriverOneName,CurrentEventCode,PlannedEventDateTimeUi,ExpectedEventDateTimeUi,FreightOrder_Informations/CreationDateTime,FreightOrderGuid,
 CurrentEventGuid, OrderingPartyName, EventReportingStatus, DriverOneName, 
DriverTwoName, CurrentEventCode, PlateNumberCountryCode, PlateNumber, 
IsDelayed, ExpectedEventDelayDuration, FreightOrderId, 
CurrentEventLocationCity, CurrentEventOrdinalNumber, NumberOfPlannedEvents, 
NumberOfSkippedEvents, PlannedDateTimeOfSkippedEvent, PlannedEventDateTime, 
PlannedEventDateTimeUi, ExpectedEventDateTimeUi, CurrentEventLocationTimeZone, 
Version, DepartureDate, DepartureLocationCity, ArrivalLocationCity, 
FreightOrder_Informations/CreationDateTimeUi&$expand=FreightOrder_Informations

with 

SAP DBTech JDBC: [260]: invalid column name: not included in SELECT DISTINCT 
column list: INFORMATIO1_.CreationDateTime: line 1 col 4941 (at pos 4940)

 

whereas the follwoing queries are successful - 

1. Containing orderby for expanded table's attribute

$orderby=FreightOrder_Informations/CreationDateTime 
asc&$expand=FreightOrder_Informations

 

2. Containing filter for expanded table's attribute

$filter=FreightOrder_Informations/CreationDateTime ge 
'2021-01-06T18:30:00.000Z'&$expand=FreightOrder_Informations

  was:
Olingo JPA fails for the following query -

$orderby=FreightOrder_Informations/CreationDateTime 
asc&$filter=FreightOrder_Informations/CreationDateTime ge 
'2021-01-06T18:30:00.000Z'&$expand=FreightOrder_Informations

with 

SAP DBTech JDBC: [260]: invalid column name: not included in SELECT DISTINCT 
column list: INFORMATIO1_.CreationDateTime: line 1 col 4941 (at pos 4940)

 

whereas the follwoing queries are successful - 

1. Containing orderby for expanded table's attribute

$orderby=FreightOrder_Informations/CreationDateTime 
asc&$expand=FreightOrder_Informations

 

2. Containing filter for expanded table's attribute

$filter=FreightOrder_Informations/CreationDateTime ge 
'2021-01-06T18:30:00.000Z'&$expand=FreightOrder_Informations


> Olingo JPA fails on orderby and filter of expanded table
> --------------------------------------------------------
>
>                 Key: OLINGO-1528
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1528
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.10
>            Reporter: Saurav Sahu
>            Priority: Major
>
> Olingo JPA fails for the following query -
> $orderby=FreightOrder_Informations/CreationDateTime 
> asc&$filter=(EventReportingStatus ne '00' and EventReportingStatus ne '' and 
> EventReportingStatus ne '04' and EventReportingStatus ne '10' and 
> CurrentEventOrdinalNumber ne 0) and (EventReportingStatus eq '01' or 
> EventReportingStatus eq '02' or EventReportingStatus eq '03') and 
> (FreightOrder_Informations/CreationDateTime ge '2021-01-06T18:30:00.000Z' and 
> FreightOrder_Informations/CreationDateTime le 
> '2021-01-07T18:29:59.999Z')&$select=OrderingPartyName,EventReportingStatus,DriverOneName,CurrentEventCode,PlannedEventDateTimeUi,ExpectedEventDateTimeUi,FreightOrder_Informations/CreationDateTime,FreightOrderGuid,
>  CurrentEventGuid, OrderingPartyName, EventReportingStatus, DriverOneName, 
> DriverTwoName, CurrentEventCode, PlateNumberCountryCode, PlateNumber, 
> IsDelayed, ExpectedEventDelayDuration, FreightOrderId, 
> CurrentEventLocationCity, CurrentEventOrdinalNumber, NumberOfPlannedEvents, 
> NumberOfSkippedEvents, PlannedDateTimeOfSkippedEvent, PlannedEventDateTime, 
> PlannedEventDateTimeUi, ExpectedEventDateTimeUi, 
> CurrentEventLocationTimeZone, Version, DepartureDate, DepartureLocationCity, 
> ArrivalLocationCity, 
> FreightOrder_Informations/CreationDateTimeUi&$expand=FreightOrder_Informations
> with 
> SAP DBTech JDBC: [260]: invalid column name: not included in SELECT DISTINCT 
> column list: INFORMATIO1_.CreationDateTime: line 1 col 4941 (at pos 4940)
>  
> whereas the follwoing queries are successful - 
> 1. Containing orderby for expanded table's attribute
> $orderby=FreightOrder_Informations/CreationDateTime 
> asc&$expand=FreightOrder_Informations
>  
> 2. Containing filter for expanded table's attribute
> $filter=FreightOrder_Informations/CreationDateTime ge 
> '2021-01-06T18:30:00.000Z'&$expand=FreightOrder_Informations



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to