Test for hasMany with sorted association