-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] cascade 및 status 관리 #151
Conversation
import org.hibernate.annotations.Where | ||
import org.jetbrains.annotations.NotNull | ||
|
||
@DynamicUpdate |
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.
이거는 왜 없애셨나욤?
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.
트러블슈팅 해결하려구 여러 방법 시도하다가 삭제 된 것 같아옴,,
@@ -55,7 +58,7 @@ class User( | |||
@Where(clause = "status = 'active'") | |||
var products: List<Product>? = ArrayList(), | |||
|
|||
@OneToMany(mappedBy = "user") | |||
@OneToMany(mappedBy = "user", orphanRemoval = true) |
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.
이건 혹시 어떤 역할인가유 ?! cascade할 때 delete문이 순차대로 실행 안 될 수도 있어서 붙인건가?-?
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.
이것도 트러블슈팅 해결하다가 이것저것,,추가된,, 이거는 user 삭제시, 자동적으로 UserInterest(고아 객체) 삭제되도록 도와주는 코드에욤
오늘 레퍼런스 찾아보니까 이 코드는 oneToMany, oneToOne에서만 사용 가눙하다고 하더라구요
🌱 이슈 번호
close #150
💬 기타 사항