Skip to content

Add lifecycle callbacks and EntityCallback support #215

Closed
@juergenzimmermann

Description

@juergenzimmermann

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.

Activity

mp911de

mp911de commented on Oct 20, 2019

@mp911de
Member

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.

changed the title [-]Hooks like JPA's @PostLoad, @PrePersist, @PreUpdate[/-] [+]Add lifecycle callbacks and EntityCallback support[/+] on Oct 20, 2019
juergenzimmermann

juergenzimmermann commented on Oct 20, 2019

@juergenzimmermann
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

mp911de commented on Oct 20, 2019

@mp911de
Member

Exactly.

IvanKonevJr

IvanKonevJr commented on Jan 22, 2020

@IvanKonevJr

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

added this to the 1.2 M2 (2020.0.0) milestone on Jul 14, 2020
added 3 commits that reference this issue on Jul 14, 2020

#215 - Prepare issue branch.

d5a7b15

#215 - Add support for EntityCallbacks.

16f3bb1

#215 - Polishing.

47c2626
added a commit that references this issue on Jul 17, 2020

#215 - Polishing.

fe313a9
added 2 commits that reference this issue on Jul 22, 2020

#215 - Add support for EntityCallbacks.

bc698c3

#215 - Polishing.

a70bd0a

4 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @schauder@juergenzimmermann@mp911de@IvanKonevJr

        Issue actions

          Add lifecycle callbacks and EntityCallback support · Issue #215 · spring-projects/spring-data-r2dbc