/** * @test */ public function inConditionWorksWithLazyObjectStorageOnSecondCall() { $blog = $this->blogRepository->findByUid(1); $this->assertInstanceOf('\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyObjectStorage', $blog->getPosts()); $inQuery = $this->postRepository->createQuery(); $inQuery->matching($inQuery->in('uid', $blog->getPosts())); $this->assertSame(10, $inQuery->count()); $newInQuery = $this->postRepository->createQuery(); $newInQuery->matching($newInQuery->in('uid', $blog->getPosts())); $this->assertSame(10, $newInQuery->count()); }