开发者

Doctrine ORM table with schema annotation

开发者 https://www.devze.com 2023-03-05 15:25 出处:网络
Schema and table name in Postgres are case sensitive. How can I specify correct schema in docblock annotations so they are not converted to lowercase?

Schema and table name in Postgres are case sensitive. How can I specify correct schema in docblock annotations so they are not converted to lowercase?

Neither of these works:

@Table(n开发者_如何学Pythoname="MySchema.MyTable") // gets converted to lowercase
@Table(name="`MySchema`.`MyTable`") // invalid table
@Table(name="`MySchema.MyTable`") // also invalid table

Doctrine ORM is 2.0.4

Theres no word about schema in documentation either, only found that schema param/keyword is no longer supported.


As mentioned in this thread, Postgres is case-sensitive and each word must be escaped:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号