Hi Guys!! 

Needing to change an idea to come to the conclusion that direction I will 
take to my application.



I have a usr entity that belongs to entity owner 
need to find out how to optimize my research query when making a search for 
usr;

Considering that whoever is doing the search is the owner, I think the best 
way to do this is a query in usr childrens of owner and restrict the new 
query to it.
An example would be:
 $query = $this->getEntityManager()->createQueryBuilder()
                ->select('usr')
                ->from('Usr\Entity\Usr', 'usr')
                -> where('usr.owner  = :owner")
                ->setParameter('owner', $id);
return $query->getQuery()->execute();

Well the results of a query on hand could make any search that wanted 
submitting new queries to this.
As the query would be in cache memory, I think I would reduce the query 
time and memory spent to get the result.

Well,  know i can create the query and then  query ->add('where',  "...."), 
but I think this more complex and confusing methodo.

My question is how to best submit new search to a parent search;

I thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to