Skip to content

Commit

Permalink
Merge branch '1.3.x'
Browse files Browse the repository at this point in the history
* 1.3.x:
  Add changelog for 1.3.2
  Add command example to create a capped collection
  Flipped key/value for SimplifiedXmlDriver example
  • Loading branch information
alcaeus committed Oct 2, 2019
2 parents 1aab9c9 + 083c3fe commit 45cee38
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions docs/en/reference/capped-collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,13 @@ You can drop the collection too if it already exists:
<?php
$documentManager->getSchemaManager()->dropDocumentCollection(Category::class);
Use the ``odm:schema:create`` command to create the database schema:

.. code-block:: console
$ php mongodb.php odm:schema:create
It must not exist when the command is invoked. It is not possible to convert an existing collection to a capped one using Doctrine. It is, however, possible to convert it by calling a `direct Mongo command`_.

.. _`direct Mongo command`: https://docs.mongodb.com/manual/core/capped-collections/#convert-a-collection-to-capped
8 changes: 4 additions & 4 deletions docs/en/reference/xml-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ Configuration of this client works a little bit different:
.. code-block:: php
<?php
$namespaces = [
'MyProject\Documents' => '/path/to/files1',
'OtherProject\Documents' => '/path/to/files2'
$prefixes = [
'/path/to/files1' => 'MyProject\Documents',
'/path/to/files2' => 'OtherProject\Documents'
];
$driver = new \Doctrine\ODM\MongoDB\Mapping\Driver\SimplifiedXmlDriver($namespaces);
$driver = new \Doctrine\ODM\MongoDB\Mapping\Driver\SimplifiedXmlDriver($prefixes);
$driver->setGlobalBasename('global'); // global.mongodb-odm.xml
Example
Expand Down

0 comments on commit 45cee38

Please sign in to comment.