cphalcon
cphalcon copied to clipboard
how to define property data type
1.I want to define date_type in model,but it does't effect,below is my model:
class Canvases extends Model { /** * @var integer / public $id; /* * @var string */ public $name; } 2.$ret = $canvasModel->findFirstById(1), var_dump($ret->id); the id type is string
You need to use mysqlnd driver and have
PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
in db service.
We only accept bug reports, new feature requests and pull requests in GitHub. For questions regarding the usage of the framework, support requests, and questions like this please visit the official forums.