File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ write mapping information with annotations, XML, or YAML:
108108
109109
.. code-block:: yaml
110110
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
112112
Acme\HelloBundle\Entity\User:
113113
type: entity
114114
table: user
@@ -124,7 +124,7 @@ write mapping information with annotations, XML, or YAML:
124124
125125
.. code-block:: xml
126126
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 -->
128128
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
129129
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
130130
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
@@ -153,7 +153,7 @@ write mapping information with annotations, XML, or YAML:
153153
.. tip::
154154

155155
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.
157157

158158
Create the database and the schema related to your metadata information with
159159
the following commands:
@@ -179,7 +179,7 @@ Eventually, use your entity and manage its persistent state with Doctrine:
179179
$user = new User();
180180
$user->setName('Jonathan H. Wage');
181181
182-
$em = $this->get('registry')->getEntityManager();
182+
$em = $this->get('doctrine')->getEntityManager();
183183
$em->persist($user);
184184
$em->flush();
185185
@@ -188,7 +188,7 @@ Eventually, use your entity and manage its persistent state with Doctrine:
188188
189189
public function editAction($id)
190190
{
191-
$em = $this->get('registry')->getEntityManager();
191+
$em = $this->get('doctrine')->getEntityManager();
192192
$user = $em->find('AcmeHelloBundle:User', $id);
193193
$user->setBody('new body');
194194
$em->persist($user);
@@ -199,7 +199,7 @@ Eventually, use your entity and manage its persistent state with Doctrine:
199199
200200
public function deleteAction($id)
201201
{
202-
$em = $this->get('registry')->getEntityManager();
202+
$em = $this->get('doctrine')->getEntityManager();
203203
$user = $em->find('AcmeHelloBundle:User', $id);
204204
$em->remove($user);
205205
$em->flush();
@@ -325,8 +325,8 @@ follow these conventions:
325325
example ``Acme/HelloBundle/Entity/``.
326326

327327
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.
330330

331331
3. Annotations is assumed if an ``Entity/`` but no
332332
"Resources/config/doctrine/" directory is found.
@@ -387,8 +387,8 @@ Doctrine registry::
387387
{
388388
public function indexAction()
389389
{
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');
392392
}
393393
}
394394

@@ -509,8 +509,8 @@ without any arguments or options:
509509
510510
.. note::
511511

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,
514514
read the ":doc:`/cookbook/doctrine/doctrine_fixtures`" entry of the Cookbook.
515515

516516
Form Integration
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ yaml.
8585
8686
.. code-block:: yaml
8787
88-
# Acme/HelloBundle/Resources/config/doctrine/metadata/mongodb/Acme.HelloBundle.Document.User.dcm.yml
88+
# Acme/HelloBundle/Resources/config/doctrine/Acme.HelloBundle.Document.User.mongodb.yml
8989
Acme\HelloBundle\Document\User:
9090
type: document
9191
collection: user
@@ -98,7 +98,7 @@ yaml.
9898
9999
.. code-block:: xml
100100
101-
<!-- Acme/HelloBundle/Resources/config/doctrine/metadata/mongodb/Acme.HelloBundle.Document.User.dcm.xml -->
101+
<!-- Acme/HelloBundle/Resources/config/doctrine/Acme.HelloBundle.Document.User.mongodb.xml -->
102102
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
103103
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
104104
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
@@ -154,7 +154,7 @@ Now, use your document and manage its persistent state with Doctrine:
154154
155155
public function deleteAction($id)
156156
{
157-
$dm = $this->get('doctrine.odm.entity_manager');
157+
$dm = $this->get('doctrine.odm.mongodb.document_manager');
158158
$user = $dm->createQuery('find all from AcmeHelloBundle:User where id = ?', $id);
159159
$dm->remove($user);
160160
$dm->flush();
@@ -271,13 +271,13 @@ can control. The following configuration options exist for a mapping:
271271
To avoid having to configure lots of information for your mappings you should
272272
follow these conventions:
273273

274-
1. Put all your entities in a directory ``Document/`` inside your bundle. For
274+
1. Put all your documents in a directory ``Document/`` inside your bundle. For
275275
example ``Acme/HelloBundle/Document/``.
276276
2. If you are using xml, yml or php mapping put all your configuration files
277-
into the ``Resources/config/doctrine/metadata/doctrine/mongodb/`` directory
278-
suffixed with dcm.xml, dcm.yml or dcm.php respectively.
277+
into the ``Resources/config/doctrine/`` directory
278+
suffixed with mongodb.xml, mongodb.yml or mongodb.php respectively.
279279
3. Annotations is assumed if an ``Document/`` but no
280-
``Resources/config/doctrine/metadata/mongodb/`` directory is found.
280+
``Resources/config/doctrine/`` directory is found.
281281

282282
The following configuration shows a bunch of mapping examples:
283283

0 commit comments

Comments
 (0)