This annotation should be just \Iterator. It does not matter what iterator it actually is. Same goes for createSessionIterator method. The old method below is correct.