| Type |
Improvement
|
| Priority |
Normal
|
| Assignee | |
| Version |
1.0
|
| Sprints |
n/a
|
| Customer |
n/a
|
Issue Votes (0)
| Type |
Improvement
|
| Priority |
Normal
|
| Assignee | |
| Version |
1.0
|
| Sprints |
n/a
|
| Customer |
n/a
|
Summary
Define and annotate the entity relationships among domain objects (
User,Project,Issue,PullRequest,GitRepo, etc.) to reflect real-world associations cleanly and correctly.This step ensures the domain model is semantically connected, navigable via JPA, and aligned with production-ready behavior such as lazy-loading, cascade rules, and cyclic reference handling.
Acceptance Criteria
@OneToMany,@ManyToOne,@ManyToManymappings withmappedByandfetchwhere applicableUser.reportedIssues,User.assignedIssues)User↔RoleUser↔ProjectProject↔Issue,GitRepo,PullRequestIssue↔IssueCommentPullRequest↔reviewers,relatedIssue,gitRepocascadesettings (e.g., cascade delete for issue comments)@JsonIgnoreon bidirectional relationships to avoid cyclic serializationNotes
FetchType.LAZYfor most@OneToManyand@ManyToManyfields to avoid N+1 query problemsPullRequestshould belong toProjectorGitRepo— decide and apply consistentlyWork Estimate
@JsonIgnoreor DTOs for cyclic refsTotal Estimate: ~3–3.25 hours