"Database map was not initialized. Please check the database loader script included by your conf" error.
emicks opened this issue · comments
After updating to 294de32 of propelorm/Propel2 (integration of PR #1742), I'm getting a "Database map was not initialized. Please check the database loader script included by your conf" error in a Symfony 4.4 application using PropelBundle. After (manually) including the loadDatabase.php script generated by model:build
in PropelBundle::configureConnections() (line 59), it seems to work. As far as I understood PR #1742 of propelorm/Propel2, the problem is that the loader script generated by model:build
is never included/required
with PropelBundle.
Thanks i will look into this problem and also check the fix commited by mringler those days as soon as possible
sorry for the delay
fix for this problem is uploaded! 396e97b
propel:model:build parameter --loader-script-dir is added
propel -> paths -> loaderScriptDir is also added to the configuration
NOTE: if you want to change directory where loadDatabase.php is created and loaded you should set both parameters mentioned above otherwise default directory will be used
NOTE: i will leave this issue open few days if you have any problems i will try to react more fast this time :)
Thank you, works perfectly.
Could this solution be backported to 3.0 version as well?
@prgTW branch 3.0 is 2 branches behind current one which mean its too old to have preloading.
Preloading come with PHP 7.4 and this is a fix for PropelORM implementation of the preloading which comes few months ago if you use PHP 7.4 and the new version of PropelORM simply change PropelBundle to the branch 5.0 and all should work