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

[feat] cascade 및 status 관리 #151

Merged
merged 3 commits into from
Aug 22, 2023
Merged

Conversation

chaerlo127
Copy link
Collaborator

🌱 이슈 번호

close #150


💬 기타 사항

  • 커밋 스펠링 오타는 실수람니다 ..ㅎ

@chaerlo127 chaerlo127 added 🔮 feat 기능을 생성해요 ! 🐣 chae-eun 채은이가 만든 기능이에요 ! 🕸️ fix 버그 코드를 수정해요 ! 👩🏻‍💻 users 사용자 도메인 기능이에요 ! 👥 cs cs 도메인 기능이에요 ! labels Aug 22, 2023
@chaerlo127 chaerlo127 self-assigned this Aug 22, 2023
import org.hibernate.annotations.Where
import org.jetbrains.annotations.NotNull

@DynamicUpdate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거는 왜 없애셨나욤?

Copy link
Collaborator Author

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 혹시 어떤 역할인가유 ?! cascade할 때 delete문이 순차대로 실행 안 될 수도 있어서 붙인건가?-?

Copy link
Collaborator Author

@chaerlo127 chaerlo127 Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 트러블슈팅 해결하다가 이것저것,,추가된,, 이거는 user 삭제시, 자동적으로 UserInterest(고아 객체) 삭제되도록 도와주는 코드에욤
오늘 레퍼런스 찾아보니까 이 코드는 oneToMany, oneToOne에서만 사용 가눙하다고 하더라구요

@chaerlo127 chaerlo127 merged commit 3617471 into develop Aug 22, 2023
1 check passed
@chaerlo127 chaerlo127 deleted the feat/#150-user-cs-cascade branch August 24, 2023 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐣 chae-eun 채은이가 만든 기능이에요 ! 👥 cs cs 도메인 기능이에요 ! 🔮 feat 기능을 생성해요 ! 🕸️ fix 버그 코드를 수정해요 ! 👩🏻‍💻 users 사용자 도메인 기능이에요 !
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] user, cs domain cascase 및 status 설정
3 participants