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

Fix issue when saving notifications #460

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Fix issue when saving notifications #460

merged 4 commits into from
Apr 16, 2024

Conversation

mpgxvii
Copy link
Member

@mpgxvii mpgxvii commented Apr 16, 2024

  • Update cascadetype in Message class to ensure transient task entities are saved
  • Update repository saving to saveAllAndFlush instead of using separate methods

Error logs:

: Unexpected error occurred in scheduled task
org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : org.radarbase.appserver.entity.Notification.task -> org.radarbase.appserver.entity.Task

Copy link
Member

@yatharthranjan yatharthranjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mpgxvii mpgxvii merged commit 3c0fa89 into dev Apr 16, 2024
4 checks passed
@mpgxvii mpgxvii deleted the fix/transient-task branch April 16, 2024 20:33
@mpgxvii mpgxvii mentioned this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants