@@ -108,7 +108,7 @@ write mapping information with annotations, XML, or YAML:
|
108 | 108 |
|
109 | 109 | .. code-block:: yaml
|
110 | 110 |
|
111 |
| -# Acme/HelloBundle/Resources/config/doctrine/Acme.HelloBundle.Entity.User.orm.dcm.yml |
| 111 | +# Acme/HelloBundle/Resources/config/doctrine/Acme.HelloBundle.Entity.User.orm.yml |
112 | 112 | Acme\HelloBundle\Entity\User:
|
113 | 113 | type: entity
|
114 | 114 | table: user
|
@@ -124,7 +124,7 @@ write mapping information with annotations, XML, or YAML:
|
124 | 124 |
|
125 | 125 | .. code-block:: xml
|
126 | 126 |
|
127 |
| -<!-- Acme/HelloBundle/Resources/config/doctrine/Acme.HelloBundle.Entity.User.orm.dcm.xml --> |
| 127 | +<!-- Acme/HelloBundle/Resources/config/doctrine/Acme.HelloBundle.Entity.User.orm.xml --> |
128 | 128 | <doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
|
129 | 129 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
130 | 130 | xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
|
@@ -153,7 +153,7 @@ write mapping information with annotations, XML, or YAML:
|
153 | 153 | .. tip::
|
154 | 154 |
|
155 | 155 | Instead of creating one file per entity, you can also define all your
|
156 |
| -mapping information into a single ``doctrine.orm.dcm.yml`` file. |
| 156 | +mapping information into a single ``doctrine.orm.yml`` file. |
157 | 157 |
|
158 | 158 | Create the database and the schema related to your metadata information with
|
159 | 159 | the following commands:
|
@@ -179,7 +179,7 @@ Eventually, use your entity and manage its persistent state with Doctrine:
|
179 | 179 | $user = new User();
|
180 | 180 | $user->setName('Jonathan H. Wage');
|
181 | 181 |
|
182 |
| -$em = $this->get('registry')->getEntityManager(); |
| 182 | +$em = $this->get('doctrine')->getEntityManager(); |
183 | 183 | $em->persist($user);
|
184 | 184 | $em->flush();
|
185 | 185 |
|
@@ -188,7 +188,7 @@ Eventually, use your entity and manage its persistent state with Doctrine:
|
188 | 188 |
|
189 | 189 | public function editAction($id)
|
190 | 190 | {
|
191 |
| -$em = $this->get('registry')->getEntityManager(); |
| 191 | +$em = $this->get('doctrine')->getEntityManager(); |
192 | 192 | $user = $em->find('AcmeHelloBundle:User', $id);
|
193 | 193 | $user->setBody('new body');
|
194 | 194 | $em->persist($user);
|
@@ -199,7 +199,7 @@ Eventually, use your entity and manage its persistent state with Doctrine:
|
199 | 199 |
|
200 | 200 | public function deleteAction($id)
|
201 | 201 | {
|
202 |
| -$em = $this->get('registry')->getEntityManager(); |
| 202 | +$em = $this->get('doctrine')->getEntityManager(); |
203 | 203 | $user = $em->find('AcmeHelloBundle:User', $id);
|
204 | 204 | $em->remove($user);
|
205 | 205 | $em->flush();
|
@@ -325,8 +325,8 @@ follow these conventions:
|
325 | 325 | example ``Acme/HelloBundle/Entity/``.
|
326 | 326 |
|
327 | 327 | 2. If you are using xml, yml or php mapping put all your configuration files
|
328 |
| -into the "Resources/config/doctrine/" directory suffixed with ``orm.dcm.xml``, |
329 |
| -``orm.dcm.yml`` or ``orm.dcm.php`` respectively. |
| 328 | +into the "Resources/config/doctrine/" directory suffixed with ``orm.xml``, |
| 329 | +``orm.yml`` or ``orm.php`` respectively. |
330 | 330 |
|
331 | 331 | 3. Annotations is assumed if an ``Entity/`` but no
|
332 | 332 | "Resources/config/doctrine/" directory is found.
|
@@ -387,8 +387,8 @@ Doctrine registry::
|
387 | 387 | {
|
388 | 388 | public function indexAction()
|
389 | 389 | {
|
390 |
| -$em = $this->get('registry')->getEntityManager(); |
391 |
| -$customerEm = $this->get('registry')->getEntityManager('customer'); |
| 390 | +$em = $this->get('doctrine')->getEntityManager(); |
| 391 | +$customerEm = $this->get('doctrine')->getEntityManager('customer'); |
392 | 392 | }
|
393 | 393 | }
|
394 | 394 |
|
@@ -509,8 +509,8 @@ without any arguments or options:
|
509 | 509 |
|
510 | 510 | .. note::
|
511 | 511 |
|
512 |
| -To be able to load data fixtures to your database, you will need to have the |
513 |
| -``DoctrineFixturesBundle`` bundle installed. To learn how to do it, |
| 512 | +To be able to load data fixtures to your database, you will need to have the |
| 513 | +``DoctrineFixturesBundle`` bundle installed. To learn how to do it, |
514 | 514 | read the ":doc:`/cookbook/doctrine/doctrine_fixtures`" entry of the Cookbook.
|
515 | 515 |
|
516 | 516 | Form Integration
|
|
0 commit comments