Currently in MakeModelsCommand line 109 we have $this->generateTable($table->name);
However the -> operator only works if the fetch style in database.php is 'FETCH_CLASS'. Some devs prefer'FETCH_ASSOC'to make the SQL results arrays of arrays, not arrays of objects. The problem is that it also fails without any clue to the cause.
The code should take this into consideration.
(I can handle it via a MR today or tomorrow, if you want.)
Hi there,
Thanks for the PR, however I think a cleaner solution would be to set the fetch mode prior to invoking the queries, then there's no change to the code.
Currently in MakeModelsCommand line 109 we have
$this->generateTable($table->name)
;However the -> operator only works if the fetch style in database.php is
'FETCH_CLASS
'. Some devs prefer'FETCH_ASSOC'
to make the SQL results arrays of arrays, not arrays of objects. The problem is that it also fails without any clue to the cause.The code should take this into consideration.
(I can handle it via a MR today or tomorrow, if you want.)