Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lifecycle callbacks and EntityCallback support #215

Closed
juergenzimmermann opened this issue Oct 19, 2019 · 5 comments
Closed

Add lifecycle callbacks and EntityCallback support #215

juergenzimmermann opened this issue Oct 19, 2019 · 5 comments
Labels
type: enhancement A general enhancement

Comments

@juergenzimmermann
Copy link

It would be nice if Spring Data R2DBC has hooks like @PostLoad, @PrePersist, @PreUpdate in JPA so that some computation for transient props could take place.

@mp911de
Copy link
Member

mp911de commented Oct 20, 2019

We will add Spring Data-typical Lifecycle callbacks using application event listeners and the EntityCallback API in a future version. JPA mostly requires lifecycle callback annotations to be used on entities while Spring Data's approach is using external listeners that are also beans.

@mp911de mp911de changed the title Hooks like JPA's @PostLoad, @PrePersist, @PreUpdate Add lifecycle callbacks and EntityCallback support Oct 20, 2019
@mp911de mp911de added the type: enhancement A general enhancement label Oct 20, 2019
@juergenzimmermann
Copy link
Author

@mp911de Does it mean there will be Interfaces like ReactiveBeforeConvertCallback like in Spring Data MongoDB? If so this would be even better than JPA-like annotations.

@mp911de
Copy link
Member

mp911de commented Oct 20, 2019

Exactly.

@IvanKonevJr
Copy link

Also may be supporting SQL Function around inserting value: #268

@mp911de mp911de added this to the 1.2 M2 (2020.0.0) milestone Jul 14, 2020
mp911de added a commit that referenced this issue Jul 14, 2020
mp911de added a commit that referenced this issue Jul 14, 2020
We now support entity callbacks for:

* AfterConvertCallback
* BeforeConvertCallback
* BeforeSaveCallback
* AfterSaveCallback

through R2dbcEntityTemplate.
mp911de added a commit that referenced this issue Jul 14, 2020
Simplify what's new section.
mp911de added a commit that referenced this issue Jul 17, 2020
Reintroduce deprecated setBeanFactory(…) method. Extract code into methods. Ensure that versioned entities are eagerly initialized to allow retries.
schauder pushed a commit that referenced this issue Jul 22, 2020
We now support entity callbacks for:

* AfterConvertCallback
* BeforeConvertCallback
* BeforeSaveCallback
* AfterSaveCallback

through R2dbcEntityTemplate.

Original pull request: #397.
schauder pushed a commit that referenced this issue Jul 22, 2020
Simplify what's new section.

Original pull request: #397.
schauder pushed a commit that referenced this issue Jul 22, 2020
Reintroduce deprecated setBeanFactory(…) method.
Extract code into methods.
Ensure that versioned entities are eagerly initialized to allow retries.

Original pull request: #397.
schauder added a commit that referenced this issue Jul 22, 2020
Formatting.

Original pull request: #397.
@schauder
Copy link
Contributor

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants