Doctrine 2.3 和 PostgreSQL 的空格和大写字段/表名称存在问题
示例:(是的,我们正在努力摆脱这种情况)
SELECT "Field Name"
FROM "Table Name"
我们也有两种格式的混合
SELECT "Field Name", another_field_name
FROM "Table Name", another_table_name
使用学说时,我得到了 PDOException。查看错误时,我发现字段/表(名称)周围没有双引号,具有大写字母和空格。
有解决办法吗?解决方法?
这是 Doctrine 生成的示例
SELECT t0.TheId AS theid1, t0.Name AS name2, t0.User AS user3
FROM The Table t0
WHERE t0.TheId = 1234
这就是我需要的方式
SELECT t0."TheId" AS theid1, t0."Name" AS name2, t0."User" AS user3
FROM "The Table" t0
WHERE t0."TheId" = 1234