The hydrator can be move outside the foreach, as the toMany will point to the same class. No need to create a new one for each iteration.