I want to learn, is it possible to use @prepersist/@preupdate like annotations in spring-data-mongodb documents i mean is it possible to make modifications before save or before update? I look forward documentation of spring data mongodb There is a listener BeforeConvertListener, but i want to use without listener, inside @document object just put an annotation to attributes. Is it possible?
I found a solution, but just related with my problem. My problem was i need to prepresist or preupdate modificationDates, insertDates. So spring-data can provide annotations for them :
@CreatedDate -> insertDate ( prepersist )
@LastModifiedDate -> updateDate ( preupdate )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With