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

Merged
merged 4 commits into from
Jul 8, 2024

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

@NicolasCwy NicolasCwy Apr 23, 2024

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.

@nusoss-bot
Copy link

Folks, This PR seems to be stalling (no activities for the past 58 days). 🐌 😢
Hope someone can get it to move forward again soon...

@nusoss-bot
Copy link

Folks, This PR seems to be stalling (no activities for the past 7 days). 🐌 😢
Hope someone can get it to move forward again soon...

@mingyuanc mingyuanc merged commit 399a5fa into TEAMMATES:master Jul 8, 2024
11 checks passed
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

5 participants