fix Mock ResultIterator
fix getting hasmany related records. add tests