Skip to content

Latest commit

Β 

History

History
14 lines (9 loc) Β· 579 Bytes

Cascade.md

File metadata and controls

14 lines (9 loc) Β· 579 Bytes

[error] object references an unsaved transient instance - save the transient instance before flushing

였λ₯˜ μ½”λ“œ

object references an unsaved transient instance - save the transient instance before flushing

κ°œμ²΄κ°€ μ €μž₯λ˜μ§€ μ•Šμ€ μΌμ‹œμ μΈ μΈμŠ€ν„΄μŠ€λ₯Ό μ°Έμ‘°ν•©λ‹ˆλ‹€. ν”ŒλŸ¬μ‹±ν•˜κΈ° 전에 μž„μ‹œ μΈμŠ€ν„΄μŠ€λ₯Ό μ €μž₯ν•©λ‹ˆλ‹€.

@OneToManyλ‚˜ @ManyToOne μ‚¬μš© μ‹œ λΆ€λͺ¨ 객체에 μΆ”κ°€ν•˜λŠ” μžμ‹ 객체가 아직 db에 μ €μž₯λ˜μ§€ μ•Šμ•„ 생긴 μ—λŸ¬μ΄λ‹€. 즉 μ˜μ†μ„± 전이λ₯Ό ν•΄μ•Όν•œλ‹€.

ν•΄κ²°

cascade = CascadeType.ALL