How to make CakePHP 2.x retrieve a tinyint database column not like boolean, but like tinyint?
MySQL:
Column | type ------------------------------- ... | ... category_id | tinyint(1) ... | ...
CakePHP:
$this->request->data = $this->Question->read(); var_dump($this->request->data['Question']['category']);
The value is always 0 (if the question I choose as the category identifier is 0) or 1 (if the question has any other category identifier).
source share