fix(database): move db setup before eager loading
Merge pull request #1 from cynek/master

fix(database): move db setup before eager loading