[FLOW3-general] fetch from Repository with QueryResult as parameter

John Small flow3.tiny69 at net-con.net
Fri Aug 17 21:56:49 CEST 2012


Hi there,

trying to get Flow3 1.1 working ;)
I'd like to obtain a subset from a repository related to a QueryResult 
from a previews one out of a different model.
These models are connected with @ORM\ManyToOne so I have that 
/flow3_persistence_identifier/ in my Table where I'd like to fetch from.

I created this in the repository class, after a few other failing version:

     /**
      * Finds all objects matching
      *
      * @param \TYPO3\FLOW3\Persistence\QueryResultInterface $entries
      * @return \TYPO3\FLOW3\Persistence\QueryResultInterface The query 
result
      */
     public function findRelatedEntries($entries) {
         $query = $this->createQuery();

         return $query->matching(
                 $query->in('entryfield', $entries)
                 )
             ->execute();
     }


But, this only works when $entries is an array of strings or objects 
having the __toString() method,
I would like to use the hidden /flow3_persistence_identifier/ field 'cos 
that's the only field I have here.
:s

Is there a decent way to fetch a subset, or what did I miss ?

thx

-- 
kind regards
John



More information about the FLOW3-general mailing list