improve hasmany beforeEach hook