You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/data-persisters.md
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ A data persister using [Doctrine ORM](http://www.doctrine-project.org/projects/o
9
9
is enabled by default. It is able to persist and delete objects that are also mapped as [Doctrine entities](https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/basic-mapping.html).
10
10
11
11
However, you may want to store data to other persistence layers (ElasticSearch or MongoDB), to separate the public model
12
-
of the API and the internal model mapped with the database; or to use patterns such as [CQRS](https://martinfowler.com/bliki/CQRS.html)
12
+
of the API and the internal model mapped with the database, or to use patterns such as [CQRS](https://martinfowler.com/bliki/CQRS.html)
13
13
to use a separate model for [read operations](data-providers.md) and for updates.
14
14
15
15
Custom data persisters can be used to do so. A project can include as many data persisters as it needs. The first able to
@@ -55,8 +55,7 @@ final class BlogPostDataPersister implements DataPersisterInterface
55
55
If service autowiring and autoconfiguration are enabled (it's the case by default), you are done!
56
56
57
57
Otherwise, if you use a custom dependency injection configuration, you need to register the corresponding service and add the
58
-
`api_platform.data_persister` tag to it. As for collection data providers, the `priority` attribute can be used to order
59
-
providers.
58
+
`api_platform.data_persister` tag to it. The `priority` attribute can be used to order persisters.
0 commit comments