Error occurs in _datarefone.php line 15:-
$pk = empty($tableSchema->primaryKey) ? $tableSchema->getColumnNames()[0] : $tableSchema->primaryKey[0];
This is because there is no tableSchema being generated.
Need to change line 14 from :-
$tableSchema = $generator->getDbConnection()->getTableSchema($relations[$generator::REL_CLASS]);
to:-
$tableSchema = $generator->getDbConnection()->getTableSchema($relations[$generator::REL_TABLE]);
getTableSchema takes the tableName, not the className.
Error occurs in _datarefone.php line 15:- $pk = empty($tableSchema->primaryKey) ? $tableSchema->getColumnNames()[0] : $tableSchema->primaryKey[0];
This is because there is no tableSchema being generated. Need to change line 14 from :- $tableSchema = $generator->getDbConnection()->getTableSchema($relations[$generator::REL_CLASS]); to:- $tableSchema = $generator->getDbConnection()->getTableSchema($relations[$generator::REL_TABLE]); getTableSchema takes the tableName, not the className.
And all is good in the world again :)