-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#12048] Migrate InstructorNotificationsPageE2E #12906
Conversation
Hi @yuanxi1, thank you for your interest in contributing to TEAMMATES!
Please address the above before we proceed to review your PR. |
Hi @yuanxi1, thanks for the research! I think the temp fix is fine - we'll probably try to resolve this when refactoring entities. Could you add the test to the edit: sorry pls ignore the first comment haha - refer to what u discussed with cedric |
There was a problem hiding this 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 and investigating the issue with persisting the databundle!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Part of #12048
Outline of Solution
From this stackoverflow post, possible cause is the unidirectional
@ManyToOne
relation onUser
but no@OneToMany
withCascadeType.ALL
on theCourse
side.Adding
@OneToMany
+CascadeType.ALL
inCourse
can fix the error, however since one course usually has many users, this may lead to slower performance.As mentioned in the same post, one fix without adding
@OneToMany
+CascadeType.ALL
is to explicitly set the parent in child after parent is created, which is adopted as a temporary fix in this pr.