fix persistence and add database in injector