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

[#12779] Fix notifications update logic #13083

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marquestye
Copy link
Contributor

@marquestye marquestye commented Apr 23, 2024

Part of #12779

Outline of Solution

  • Added flushAndEvict to HibernateUtil.java
  • During update, evict entity -> call setters -> check validity -> merge entity
  • Changed EntitiesDb#merge to print with returned entity to overcome invalid proxy issue for entities with no persistent instance
    • Added required mocks for component tests calling merge
  • Added tests for invalid data persistence
  • Moved invalid params checks and tests from db to logic layer

@marquestye marquestye self-assigned this Apr 23, 2024
@marquestye marquestye changed the title [#12048] Fix notifications update logic [#12779] Fix notifications update logic Apr 23, 2024
Copy link
Contributor

@cedricongjh cedricongjh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the work on this

@cedricongjh cedricongjh added the s.FinalReview The PR is ready for final review label Apr 23, 2024
assert notification != null;

if (!notification.isValid()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is moving the isValid check to the logic layer better? I was thinking we could leave it here. This is similar to accountDb
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was previously suggested here. I'm not too sure which is better myself though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s.FinalReview The PR is ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants