【发布时间】:2020-09-26 06:05:16
【问题描述】:
当使用 phpunit 运行测试时,我得到了一个不太好的异常
SQLSTATE[HY000]: General error: 25 column index out of range (SQL: select count(*) as aggregate from "attachments" where "id" = f3bad3ad-a888-41bc-b6fd-9a5998f6b527
Attachment.Id 是一个 UUID,列被定义为主键。运行测试时,我使用带有内存数据库的 SQLite。
当切换到 MySQL 时,我不再收到错误消息。我真的不知道为什么查询会导致错误。
有什么建议吗?
【问题讨论】: