Plugin model annotations
dereuromark opened this issue · 0 comments
dereuromark commented
They only work if the tables are 1:1 existing in the project you are running it from
bin/cake annotate all -p Ratings -v -d
results in
-> RatingsTable
Skipping table and entity: SQLSTATE[42S02]: Base table or view not found:
Table 'cake_test.ratings' doesn't exist
I wonder if we could try to switch to test connection and use the schema.php to inject the tables at runtime before?
if ($plugin) {
ConnectionManager::drop('default');
ConnectionManager::alias('test', 'default');
ConnectionManager::get('default');
if (env('FIXTURE_SCHEMA_METADATA')) {
$loader = new SchemaLoader();
$loader->loadInternalFile(env('FIXTURE_SCHEMA_METADATA'), 'default');
}
}
This doesnt work, but maybe sth similar?