OHDSI / OHDSI/WebAPI

Hypersistence Optimizer Issues: Critical: BidirectionalSynchronizationEvent

Open
#2,263 2 comments 0 reactions 0 assignees View on GitHub

@ecruz165 is already working on this.

Since Feb 24, 2023.

  • #2220 by @ecruz165 — open
Dominant language
Java
Stars
151
Forks
183
Avg merge
14m
Merged PRs (30d)
2

Description

https://vladmihalcea.com/hypersistence-optimizer/docs/user-guide/#BidirectionalSynchronizationEvent

The Hypersistence Optimizer report suggests adding synchronization methods.

When mapping a bidirectional one-to-many or many-to-many association, you need to synchronize both sides of the association. Without synchronizing both sides, Hibernate cannot guarantee that the association state changes propagate to the database.

More, unsynchronized bidirectional associations can also lead to very subtle bugs that are hard to reproduce. For this reason, it’s best to have two utility methods (e.g., addEntity and removeEntity) on the mappedBy side of the one-to-many or many-to-many associations.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Hypersistence Optimizer BidirectionalSynchronizationEvent documentation linked in the issue, then review linked pull request #2220 to locate the affected mappings. Identify the bidirectional associations flagged by the report and verify that their synchronization methods are present and that the report no longer identifies them.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.