Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduce PARTIAL, but only for non-object hydration. #11365

Merged
merged 5 commits into from
Jul 24, 2024

Conversation

beberlei
Copy link
Member

@beberlei beberlei commented Mar 16, 2024

As discussed in #8471 (comment), PARTIAL is re-introduced in 3.2 but only when used with non object hydrators, usefully with array hydration.

This will allow retrieval of partial fields with complex entity dql relationships, example:

    $query = $em->createQuery('SELECT partial u.{id, username}, partial a.{id, name} FROM CmsUser u JOIN u.articles a');
    $users = $query->getArrayResult(); // array of partially loaded CmsUser and CmsArticle fields

Todo:

  • Test for the partial hydration exception with object hydration mode
  • Test for UnitOfWork::createEntity with partial keyword usage.
  • Actual test for array hydrator partial usage

Related:

@beberlei beberlei marked this pull request as ready for review March 16, 2024 21:40
greg0ire
greg0ire previously approved these changes Mar 16, 2024
@raziel057
Copy link
Contributor

When will it be merged?

@derrabus
Copy link
Member

Let's wait for #11366 to be merged up.

@boogiefromzk
Copy link

Let's wait for #11366 to be merged up.

It's merged. Please proceed with this pull request as well.

@greg0ire
Copy link
Member

greg0ire commented Jul 10, 2024

@boogiefromzk it's merged, yes, but is it merged up? Right now, the answer is no. By the way, another thing we will have to do is retarget this to 3.3.x.

@greg0ire
Copy link
Member

greg0ire commented Jul 10, 2024

Merge up done: #11547

@greg0ire greg0ire changed the base branch from 3.2.x to 3.3.x July 10, 2024 07:01
@greg0ire greg0ire dismissed their stale review July 10, 2024 07:01

The base branch was changed.

@greg0ire greg0ire merged commit 96546ca into doctrine:3.3.x Jul 24, 2024
65 checks passed
@greg0ire greg0ire added this to the 3.3.0 milestone Jul 24, 2024
@greg0ire
Copy link
Member

Thanks @beberlei !

@alexoueb
Copy link

Hello, when is the release of version 3.3.0 scheduled, please?

@greg0ire
Copy link
Member

Hi @alexoueb , as you can see on this page, there is no due date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants