For the latest stable version, please use Spring Data Relational 3.4.0!spring-doc.cn

EntityCallbacks

Spring Data R2DBC uses the EntityCallback API for its auditing support and reacts on the following callbacks.spring-doc.cn

Table 1. Supported Entity Callbacks
Callback Method Description Order

BeforeConvertCallbackspring-doc.cn

onBeforeConvert(T entity, SqlIdentifier table)spring-doc.cn

Invoked before a domain object is converted to OutboundRow.spring-doc.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cn

AfterConvertCallbackspring-doc.cn

onAfterConvert(T entity, SqlIdentifier table)spring-doc.cn

Invoked after a domain object is loaded.
Can modify the domain object after reading it from a row.spring-doc.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cn

AuditingEntityCallbackspring-doc.cn

onBeforeConvert(T entity, SqlIdentifier table)spring-doc.cn

Marks an auditable entity created or modifiedspring-doc.cn

100spring-doc.cn

BeforeSaveCallbackspring-doc.cn

onBeforeSave(T entity, OutboundRow row, SqlIdentifier table)spring-doc.cn

Invoked before a domain object is saved.
Can modify the target, to be persisted, OutboundRow containing all mapped entity information.spring-doc.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cn

AfterSaveCallbackspring-doc.cn

onAfterSave(T entity, OutboundRow row, SqlIdentifier table)spring-doc.cn

Invoked after a domain object is saved.
Can modify the domain object, to be returned after save, OutboundRow containing all mapped entity information.spring-doc.cn

Ordered.LOWEST_PRECEDENCEspring-doc.cn