Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 517f386

Browse filesBrowse files
committed
[#7907] add some use statements
1 parent 14afb12 commit 517f386
Copy full SHA for 517f386

File tree

Expand file treeCollapse file tree

3 files changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+9
-0
lines changed

‎doctrine.rst

Copy file name to clipboardExpand all lines: doctrine.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,9 @@ Updating an Object
632632
Once you've fetched an object from Doctrine, updating it is easy. Suppose
633633
you have a route that maps a product id to an update action in a controller::
634634

635+
use AppBundle\Entity\Post;
636+
// ...
637+
635638
public function updateAction($productId)
636639
{
637640
$em = $this->getDoctrine()->getManager();

‎doctrine/associations.rst

Copy file name to clipboardExpand all lines: doctrine/associations.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ When you need to fetch associated objects, your workflow looks just like it
273273
did before. First, fetch a ``$product`` object and then access its related
274274
``Category`` object::
275275

276+
use AppBundle\Entity\Post;
277+
// ...
278+
276279
public function showAction($productId)
277280
{
278281
$product = $this->getDoctrine()

‎doctrine/repository.rst

Copy file name to clipboardExpand all lines: doctrine/repository.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ entities, ordered alphabetically by name.
8686

8787
You can use this new method just like the default finder methods of the repository::
8888

89+
use AppBundle\Entity\Post;
90+
// ...
91+
8992
$em = $this->getDoctrine()->getManager();
9093
$products = $em->getRepository(Product::class)
9194
->findAllOrderedByName();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.