replace BackendModel::getDB()/FrontendModel::getDB() with the getContainer()->get('database') counterpart