Fix hasRecords for Oracle