Browse Source
Move examples into test source root to ensure proper compilation. Remove lingering asciidoc resources. Merge entity callbacks into lifecycle events. Add links from MongoDB overview.labs/antora
19 changed files with 92 additions and 106 deletions
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
@ -1 +0,0 @@
@@ -1 +0,0 @@
|
||||
// include::{commons}@data-commons::page$kotlin/object-mapping.adoc[] |
||||
@ -1,45 +0,0 @@
@@ -1,45 +0,0 @@
|
||||
include::{commons}@data-commons::page$entity-callbacks.adoc[] |
||||
|
||||
[[mongo.entity-callbacks]] |
||||
== Store specific EntityCallbacks |
||||
|
||||
Spring Data MongoDB uses the `EntityCallback` API for its auditing support and reacts on the following callbacks. |
||||
|
||||
.Supported Entity Callbacks |
||||
[%header,cols="4"] |
||||
|=== |
||||
| Callback |
||||
| Method |
||||
| Description |
||||
| Order |
||||
|
||||
| Reactive/BeforeConvertCallback |
||||
| `onBeforeConvert(T entity, String collection)` |
||||
| Invoked before a domain object is converted to `org.bson.Document`. |
||||
| `Ordered.LOWEST_PRECEDENCE` |
||||
|
||||
| Reactive/AfterConvertCallback |
||||
| `onAfterConvert(T entity, org.bson.Document target, String collection)` |
||||
| Invoked after a domain object is loaded. + |
||||
Can modify the domain object after reading it from a `org.bson.Document`. |
||||
| `Ordered.LOWEST_PRECEDENCE` |
||||
|
||||
| Reactive/AuditingEntityCallback |
||||
| `onBeforeConvert(Object entity, String collection)` |
||||
| Marks an auditable entity _created_ or _modified_ |
||||
| 100 |
||||
|
||||
| Reactive/BeforeSaveCallback |
||||
| `onBeforeSave(T entity, org.bson.Document target, String collection)` |
||||
| Invoked before a domain object is saved. + |
||||
Can modify the target, to be persisted, `Document` containing all mapped entity information. |
||||
| `Ordered.LOWEST_PRECEDENCE` |
||||
|
||||
| Reactive/AfterSaveCallback |
||||
| `onAfterSave(T entity, org.bson.Document target, String collection)` |
||||
| Invoked before a domain object is saved. + |
||||
Can modify the domain object, to be returned after save, `Document` containing all mapped entity information. |
||||
| `Ordered.LOWEST_PRECEDENCE` |
||||
|
||||
|=== |
||||
|
||||
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
[[cassandra.projections]] |
||||
[[mongodb.projections]] |
||||
= Projections |
||||
|
||||
include::{commons}@data-commons::page$repositories/projections.adoc[leveloffset=+1] |
||||
|
||||
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 48 KiB |
Loading…
Reference in new issue