Skip to content

Commit 0dc6169

Browse files
mp911dechristophstrobl
authored andcommitted
DATAMONGO-1398, DATAMONGO-1395 - Update Lifecycle Events examples in Reference Documentation.
Replace deprecated methods by the supported API. Original Pull Request: spring-projects#349
1 parent abe78f0 commit 0dc6169

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/asciidoc/reference/mongodb.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2160,7 +2160,7 @@ To intercept an object before it goes through the conversion process (which turn
21602160
----
21612161
public class BeforeConvertListener extends AbstractMongoEventListener<Person> {
21622162
@Override
2163-
public void onBeforeConvert(Person p) {
2163+
public void onBeforeConvert(BeforeConvertEvent<Person> event) {
21642164
... does some auditing manipulation, set timestamps, whatever ...
21652165
}
21662166
}
@@ -2174,7 +2174,7 @@ To intercept an object before it goes into the database, you'd register a subcla
21742174
----
21752175
public class BeforeSaveListener extends AbstractMongoEventListener<Person> {
21762176
@Override
2177-
public void onBeforeSave(Person p, DBObject dbo) {
2177+
public void onBeforeSave(BeforeSaveEvent<Person> event) {
21782178
… change values, delete them, whatever …
21792179
}
21802180
}

0 commit comments

Comments
 (0)