symfony - Symfony2 and Doctrine 2 result data incorrectly returns an array of nulls -
i have query run in doctrine; failing, in weird way. query has worked year, messed composer.json bit adding couple new libraries, , changing versions. updated linux box (maybe mysql or mariadb has been updated, not sure).
whatever has changed (doubtful it's bundle's doctrine model code, unless wasn't kosher in first place , core update reveals broken), query returning results, array of correct amount of keys, values getting nulled somehow. array looks this, direct copy , paste var_dump, e.g.
var_dump($query->getsql()); var_dump($results); exit; select goallabel opt_goals scale = 'mathematics' array(17) { [0]=> null [1]=> null [2]=> null [3]=> null [4]=> null [5]=> null [6]=> null [7]=> null [8]=> null [9]=> null [10]=> null [11]=> null [12]=> null [13]=> null [14]=> null [15]=> null [16]=> null } but when run same query in mysql command line, actual results, same amount of keys, values are there.
here's non default portion of composer.json require section:
"components/jquery": "~1.11,<2.0", "twbs/bootstrap": "3.3.*", "braincrafted/bootstrap-bundle": "~2.1", "knplabs/knp-menu": "~1.1", "knplabs/knp-menu-bundle": "~1.1", "knplabs/knp-paginator-bundle": "dev-master", "symfony/icu": "1.1.*", "mnot/hinclude": "dev-master", "rhumsaa/array_column": "~1.1", "webfactory/exceptions-bundle": "@stable", "friendsofsymfony/jsrouting-bundle": "~1.5", "hearsay/require-js-bundle": "~1.0", "browserstate/history.js": "dev-master" pay close attention version adjustments, because did mess this. don't know @ point doctrine went off deep end.
edit: per latest comments, , now seeing this, going on? this url more appropriate because not using doctrine/dbal, i'm using doctrine/orm.
this problem caused updating of doctrine/orm version 2.5 2.4.x. there lot of bc breaks.
downgrade doctrine/orm https://packagist.org/packages/doctrine/orm#v2.4.7 , problem go away. after knowing issue, need rewrite queries satisfy new requirements. did see note in there mariadb problem well.
in fact, since haven't tackled yet myself, might easy regenerating entities. i'm hesitant when that....
Comments
Post a Comment