manytoone

    [Debug]JPA 영속성 오류, joinColumn값(@ManyToOne)에 cascade추가

    서브 쿼리를 구성을 해서 실행하던 도중 서브 쿼리 오류는 고쳤지만 아래와 같이 오류가 발생합니다. object references an unsaved transient instance - save the transient instance before flushing : com.cos.unishop.domain.bucket.BucketProducts.product -> com.cos.unishop.domain.product.Product 영속성 때문에 오류가 나타난다던데, join 하는 쪽에 cascade를 설정해주면 해결이 됩니다. cascade = cascadeType.All 문제없이 실행됩니다 Reference https://www.baeldung.com/jpa-cascade-types https:/..