fix for manyToMany not returning results

Since commit 8eff54bdea099ca914c6eccf37a7a0bc329a1d25, Many to many associations have been returning empty arrays when there should be data. This addresses the issue, any feedback is appreciated.