Creating test case for N+1 detection issue in polymophic relationship