【问题标题】:Doctrine ORM table with schema annotation带有模式注释的 Doctrine ORM 表
【发布时间】:2011-05-12 11:49:02
【问题描述】:

Postgres 中的模式和表名区分大小写。如何在 docblock 注释中指定正确的架构,使其不会转换为小写?

这些都不起作用:

@Table(name="MySchema.MyTable") // gets converted to lowercase
@Table(name="`MySchema`.`MyTable`") // invalid table
@Table(name="`MySchema.MyTable`") // also invalid table

Doctrine ORM 是 2.0.4

文档中也没有关于架构的说法,只是发现不再支持架构参数/关键字。

【问题讨论】:

标签: php orm doctrine-orm


【解决方案1】:

正如this 线程中提到的,Postgres 区分大小写,每个单词都必须转义:

@Table(name="""MySchema"".""MyTable""")

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-24
    • 2012-12-06
    • 2019-11-10
    • 1970-01-01
    相关资源
    最近更新 更多