You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I'm trying to convert this to setFetchMode (#8391) because partial queries are removed in v3. I've tried this:
$qb = $this->createQueryBuilder('mail');
// ...$query = $qb->getQuery();
$query->setFetchMode(Mail::class, 'recipients', ClassMetadata::FETCH_EAGER); // this works great$query->setFetchMode(MailRecipient::class, 'user', ClassMetadata::FETCH_EAGER); // this does not work$mails = $query->getResult();
The second setFetchMode call does not have any effect. It would be great if setFetchMode would work for nested relations.
Or is there any other (good) replacement for my partial query?
The text was updated successfully, but these errors were encountered:
Feature Request
Summary
At the moment I'm using partial queries for fetching nested entities:
Now I'm trying to convert this to
setFetchMode
(#8391) because partial queries are removed in v3. I've tried this:The second
setFetchMode
call does not have any effect. It would be great ifsetFetchMode
would work for nested relations.Or is there any other (good) replacement for my partial query?
The text was updated successfully, but these errors were encountered: