forked from doctrine/orm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/3.3.x' into 4.0.x
- Loading branch information
Showing
75 changed files
with
1,564 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,45 +5,16 @@ on: | |
branches: | ||
- "*.x" | ||
paths: | ||
- .github/workflows/documentation.yml | ||
- docs/** | ||
- ".github/workflows/documentation.yml" | ||
- "docs/**" | ||
push: | ||
branches: | ||
- "*.x" | ||
paths: | ||
- .github/workflows/documentation.yml | ||
- docs/** | ||
- ".github/workflows/documentation.yml" | ||
- "docs/**" | ||
|
||
jobs: | ||
validate-with-guides: | ||
name: "Validate documentation with phpDocumentor/guides" | ||
runs-on: "ubuntu-22.04" | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "8.3" | ||
|
||
- name: "Remove existing composer file" | ||
run: "rm composer.json" | ||
|
||
- name: "Require phpdocumentor/guides-cli" | ||
run: "composer require --dev phpdocumentor/guides-cli --no-update" | ||
|
||
- name: "Install dependencies with Composer" | ||
uses: "ramsey/composer-install@v3" | ||
with: | ||
dependency-versions: "highest" | ||
|
||
- name: "Add orphan metadata where needed" | ||
run: | | ||
printf '%s\n\n%s\n' ":orphan:" "$(cat docs/en/sidebar.rst)" > docs/en/sidebar.rst | ||
printf '%s\n\n%s\n' ":orphan:" "$(cat docs/en/reference/installation.rst)" > docs/en/reference/installation.rst | ||
- name: "Run guides-cli" | ||
run: "vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'No template found for rendering directive' | ( ! grep WARNING )" | ||
documentation: | ||
name: "Documentation" | ||
uses: "doctrine/.github/.github/workflows/[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
:orphan: | ||
|
||
Installation | ||
============ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Partial Hydration | ||
================= | ||
|
||
.. note:: | ||
|
||
Creating Partial Objects through DQL was possible in ORM 2, | ||
but is only supported for array hydration as of ORM 3. | ||
|
||
Partial hydration of entities is allowed in the array hydrator, when | ||
only a subset of the fields of an entity are loaded from the database | ||
and the nested results are still created based on the entity relationship structure. | ||
|
||
.. code-block:: php | ||
<?php | ||
$users = $em->createQuery("SELECT PARTIAL u.{id,name}, partial a.{id,street} FROM MyApp\Domain\User u JOIN u.addresses a") | ||
->getArrayResult(); | ||
This is a useful optimization when you are not interested in all fields of an entity | ||
for performance reasons, for example in use-cases for exporting or rendering lots of data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.