Hello,
i want to report bug i have found regarding data types returned by method \Phalcon\Mvc\Model\MetaData::getDataTypes for PostgreSQL DB.
For columns of datatype double precision or real, this method is returning 2 which wrongly corresponding to \Phalcon\Db\Column ::TYPE_VARCHAR instead of respectively: \Phalcon\Db\Column::TYPE_DOUBLE for double precision and \Phalcon\Db\Column::TYPE_FLOAT for real.
Example dump of print_r of array returned by getDataTypes($model), where $model is subclass of \Phalcon\Mvc Model:
Array (
[id] => 0
[name] => 2
[is_self_delivery] => 8
[is_active_for_client] => 8
[is_active_for_admin] => 8
[default_delivery_price_netto] => 2
[is_default] => 8
[can_delivery_to_client] => 8
[can_delivery_returns] => 8
[php_manager_class] => 2
[default_delivery_price_vat_pct] => 2
[default_delivery_price_vat_val] => 2
[default_delivery_price_brutto] => 2 )
default_delivery_price_netto and default_delivery_price_brutto - double precision type columns, should be 9 (\Phalcon\Db\Column::TYPE_DOUBLE) instead of 2.
Columns default_delivery_price_vat_pct and default_delivery_price_vat_val - real type columns should be 7 (\Phalcon\Db\Column::TYPE_FLOAT) instead of 2.
Please fix it.
PS. Im running the latest version of Phalcon: 3.1.2
PS 2. Here is list of all PostgreSQL data types, please do necessary connections instead of dumping it to datatype VARCHAR :)
https://www.postgresql.org/docs/9.6/static/datatype.html#DATATYPE-TABLE