简体   繁体   English

在doctrine 1.2中使用禁用列名

[英]Using forbidden column names in doctrine 1.2

I'm using postgresql database. 我正在使用postgresql数据库。 I have table with column called "from" (I can't change it). 我有一个名为“from”的列表(我无法改变它)。 Sql insertion query generated by doctrine are incorrect, because column name "from" should be closed by quotation marks. 由doctrine生成的sql插入查询不正确,因为列名“from”应该用引号括起来。 How can I tell doctrine to do this? 我怎么能告诉学说呢?

I believe, there is fast and clean way to correct that. 我相信,有快速而干净的方法来纠正这一点。

Thanks in advance. 提前致谢。

Maybe $conn->setAttribute(Doctrine_Core::ATTR_QUOTE_IDENTIFIER, true); 也许$conn->setAttribute(Doctrine_Core::ATTR_QUOTE_IDENTIFIER, true); ? From Docs -> Configuration -> Identifier quoting 文档 - >配置 - >标识符引用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM