cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

model 定义数据类型不起作用

Open shangxin2533 opened this issue 8 years ago • 2 comments

1.我建立了一个model /** * @var int */ public $create_time; 2.Canvases::findFirstById(122)得到的create_time为什么是string类型呢

shangxin2533 avatar Dec 15 '17 11:12 shangxin2533

注释跟字段定义的是没关系的。

zGaron avatar Dec 17 '17 03:12 zGaron

数据库的连接配置一下: 'options' => array( Pdo::ATTR_EMULATE_PREPARES => false, Pdo::ATTR_STRINGIFY_FETCHES => false )

leupom avatar Jan 12 '18 01:01 leupom