Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using forbidden column names in doctrine 1.2

Tags:

php

doctrine

I'm using postgresql database. I have table with column called "from" (I can't change it). Sql insertion query generated by doctrine are incorrect, because column name "from" should be closed by quotation marks. How can I tell doctrine to do this?

I believe, there is fast and clean way to correct that.

Thanks in advance.

like image 981
KLXN Avatar asked Oct 25 '22 04:10

KLXN


1 Answers

Maybe $conn->setAttribute(Doctrine_Core::ATTR_QUOTE_IDENTIFIER, true);? From Docs -> Configuration -> Identifier quoting

like image 170
binaryLV Avatar answered Oct 27 '22 10:10

binaryLV