Description
Issue :
http://localhost:8080/xxx/odata/**ScheduleRuns**?$expand=SchedulerRunMessages
If you see ScheduleRuns is a Composite Primary and we are applying expand on SchedulerRunMessages, the result which we receive is shown below.
Actually it should return SchedulerRunMessages list first record value which is empty but in db value is present .
This issue happens when we add Pagination for entity ScheduleRuns.
Query without Pagination :
select
distinct srm1_0.RunMessage,
srm1_0.ScheduleId,
srm1_0.MessageSeqNo,
srm1_0.ScheduleRunMessageId,
srm1_0.RunTimestamp
from
tx.vi_ScheduleRun sr1_0
join
tx.ScheduleRunMessage srm1_0
on sr1_0.RunTimestamp=srm1_0.RunTimestamp
and sr1_0.ScheduleId=srm1_0.ScheduleId
order by
2,
5
Query with Pagination :
select
distinct srm1_0.ScheduleId,
srm1_0.RunMessage,
srm1_0.RunTimestamp,
srm1_0.MessageSeqNo,
srm1_0.ScheduleRunMessageId
from
tx.vi_ScheduleRun sr1_0
join
tx.ScheduleRunMessage srm1_0
on sr1_0.RunTimestamp=srm1_0.RunTimestamp
and sr1_0.ScheduleId=srm1_0.ScheduleId
where
(
sr1_0.RunTimestamp>=?
and sr1_0.ScheduleId=?
or sr1_0.ScheduleId>?
)
and (
sr1_0.RunTimestamp<=?
and sr1_0.ScheduleId=?
or sr1_0.ScheduleId<?
)
order by
1,
3,
5
Failure Reason : where condition Key boundary condition .
Temporary fix :
In JPANavigationRequestProcessor.java class a below condition have been applied.