We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

getDataTypes doesn't work correctly

getDataTypes() should return something more meaningfull than "int"

array(6) { ["_var"]=> int(2) ["_text"]=> int(6) ["_numeric"]=> int(3) ["_boolean"]=> int(8) ["_timestamp"]=> int(4) ["_time"]=> int(2) }
<?php
/*
CREATE TABLE test
(   _var VARCHAR NOT NULL PRIMARY KEY,
    _text TEXT,
    _numeric NUMERIC,
    _boolean BOOLEAN,
    _timestamp TIMESTAMP WITH TIME ZONE,
    _time TIME WITH TIME ZONE
);
 */

class Test extends Phalcon\Mvc\Model
{
    public function initialize() {
        $this->setSource('test');
    }

}

class TestController extends Phalcon\Mvc\Controller {

    public function indexAction(){
        $metaData = new Phalcon\Mvc\Model\MetaData\Memory();
        var_dump($metaData->getDataTypes(new Test()));
    }
}


43.9k

You should ask taht as NFR on github