Using Pomelo.EntityFrameworkCore.MySql Entity Framework ORM and MySQL Connector and it generates the following query:
SELECT `o`.`UserCallHistoryId`, `o`.`CallDateTime`, `o`.`CallDurationInSeconds`, `o`.`CallHistoryId`, `o`.`DispositionCallHistoryUserCallDispositionId`, `o`.`HasCallRecording`, `o`.`HasVoicemail`, `o`.`IsInbound`, `o`.`IsInternal`, `o`.`OtherPartyAttendantAccountAutoAttendantId`, `o`.`OtherPartyForwardingNumberAccountForwardingNumberId`, `o`.`OtherPartyHostedNumberAccountHostedNumberId`, `o`.`OtherPartyLocationLocationId`, `o`.`OtherPartyPhoneNumber`, `o`.`OtherPartyUserAccountUserId`, `o`.`OtherPartyUserGroupAccountUserGroupId`, `o`.`UserAccountUserId`, `o.CallHistory`.`CallHistoryId`, `o.CallHistory`.`AccountId`, `o.CallHistory`.`CallCompleteDateTime`, `o.CallHistory`.`CallDateTime`, `o.CallHistory`.`CallHistoryDestinationId`, `o.CallHistory`.`CallHistoryOriginationId`, `o.CallHistory`.`HasCallRecording`, `o.CallHistory`.`HasVoicemail`, `o.CallHistory`.`RawDurationInSeconds`, `o.User`.`AccountUserId`, `o.User`.`AccountId`, `c`.`CallHistoryId`, `c`.`AccountId`, `c`.`CallCompleteDateTime`, `c`.`CallDateTime`, `c`.`CallHistoryDestinationId`, `c`.`CallHistoryOriginationId`, `c`.`HasCallRecording`, `c`.`HasVoicemail`, `c`.`RawDurationInSeconds`, `a`.`AccountAutoAttendantId`, `a`.`AccountId`, `a0`.`AccountHostedNumberId`, `a0`.`AccountId`, `a0`.`HostedPhoneNumber`, `a1`.`AccountUserId`, `a1`.`AccountId`, `a2`.`AccountUserGroupId`, `a2`.`AccountId`, `a2`.`AccountUserGroupType`, `a3`.`AccountForwardingNumberId`, `a3`.`AccountId`
FROM `UserCallHistory` AS `o`
LEFT JOIN `CallHistory` AS `o.CallHistory` ON `o`.`CallHistoryId` = `o.CallHistory`.`CallHistoryId`
LEFT JOIN `AccountUser` AS `o.User` ON `o`.`UserAccountUserId` = `o.User`.`AccountUserId`
LEFT JOIN `CallHistory` AS `c` ON `o`.`CallHistoryId` = `c`.`CallHistoryId`
LEFT JOIN `AccountAutoAttendant` AS `a` ON `o`.`OtherPartyAttendantAccountAutoAttendantId` = `a`.`AccountAutoAttendantId`
LEFT JOIN `AccountHostedNumber` AS `a0` ON `o`.`OtherPartyHostedNumberAccountHostedNumberId` = `a0`.`AccountHostedNumberId`
LEFT JOIN `AccountUser` AS `a1` ON `o`.`OtherPartyUserAccountUserId` = `a1`.`AccountUserId`
LEFT JOIN `AccountUserGroup` AS `a2` ON `o`.`OtherPartyUserGroupAccountUserGroupId` = `a2`.`AccountUserGroupId`
LEFT JOIN `AccountForwardingNumber` AS `a3` ON `o`.`OtherPartyForwardingNumberAccountForwardingNumberId` = `a3`.`AccountForwardingNumberId`
WHERE (`o.User`.`AccountUserId` = '53ed425c-7ddd-4c0d-ba63-fdb81e265bf4') AND (`o.CallHistory`.`CallCompleteDateTime` > timestamp '2017-10-18 15:18:15.000000')
ORDER BY `o`.`CallHistoryId`, `o`.`UserAccountUserId`;
This query does not return any results when, in fact, that is data in the table that matches the criteria. If I update the following line from timestamp '2017-10-18 15:18:15.000000' to timestamp('2017-10-18 15:18:15.000000') the query returns the correct results. Any ideas?
Using Pomelo.EntityFrameworkCore.MySql Entity Framework ORM and MySQL Connector and it generates the following query:
This query does not return any results when, in fact, that is data in the table that matches the criteria. If I update the following line from
timestamp '2017-10-18 15:18:15.000000'totimestamp('2017-10-18 15:18:15.000000')the query returns the correct results. Any ideas?