php - Propel not adding single quote to fields name in MySql query
I have the following mysql table:
CREATE TABLE `content_segments`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`include` TINYINT(1) NOT NULL,
`dimension` VARCHAR(50) NOT NULL,
`media_type` VARCHAR(50) NOT NULL,
`match` VARCHAR(50) NOT NULL,
`content` TEXT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
The problem is the match field is reserved word in MySQL, and propel2 doesn't surround the fields name with a single quote to escape the reserved word at run-time (when the query is generated). I wonder if there's a why to force propel escaping all my table fields with single quote to avoid reserved words errors. The error I'm getting is this:
Unable to execute SELECT statement [SELECT id, include, dimension, media_type, match, content FROM content_segments WHERE id = :p0]
Answer
Solution:
The solution is in the issue discussion on propel git repository.
As it was stated in the comment of the question, the related propel issue is https://github.com/propelorm/Propel2/issues/781 for propel2