@@ -48,14 +48,14 @@ database for you:
4848
4949 $ php bin/console doctrine:database:create
5050
51- There are more optiosn in ``config/packages/doctrine.yaml `` that you can configure,
51+ There are more options in ``config/packages/doctrine.yaml `` that you can configure,
5252including your ``server_version `` (e.g. 5.7 if you're using MySQL 5.7), which may
5353affect how Doctrine functions.
5454
5555.. tip ::
5656
57- There are many other Doctrine commands. To see a full list, run
58- `` php bin/console list doctrine `` .
57+ There are many other Doctrine commands. Run `` php bin/console list doctrine ``
58+ to see a full list .
5959
6060Creating an Entity Class
6161------------------------
@@ -178,7 +178,8 @@ in the database. This is usually done with annotations:
178178
179179 Doctrine supports a wide variety of different field types, each with their own options.
180180To see a full list of types and options, see `Doctrine's Mapping Types documentation `_.
181- If you want to use ``xml `` instead of annotations, you'll need to configure this in your
181+ If you want to use XML instead of annotations, add ``type: xml `` and
182+ ``dir: '%kernel.project_dir%/config/doctrine `` to the entity mappings in your
182183``config/packages/doctrine.yaml `` file.
183184
184185.. caution ::
@@ -363,7 +364,7 @@ Try it out!
363364
364365 http://localhost:8000/product
365366
366- Congratulations! You just created your first row the ``product `` table. To prove it,
367+ Congratulations! You just created your first row in the ``product `` table. To prove it,
367368you can query the database directly:
368369
369370.. code-block :: terminal
@@ -589,7 +590,7 @@ But what if you need a more complex query? When you generated your entity with
589590 }
590591 }
591592
592- When you fetch your repository (i.e. ``->getRepository(Product::class) ``, it is
593+ When you fetch your repository (i.e. ``->getRepository(Product::class) ``) , it is
593594*actually * an instance of *this * object! This is because of the ``repositoryClass ``
594595config that was generated at the top of your ``Product `` entity class.
595596
@@ -601,7 +602,10 @@ a new method for this to your repository::
601602 // ...
602603 class ProductRepository extends ServiceEntityRepository
603604 {
604- // ...
605+ public function __construct(RegistryInterface $registry)
606+ {
607+ parent::__construct($registry, Product::class);
608+ }
605609
606610 /**
607611 * @param $price
0 commit comments