Closed junho3 closed 4 months ago
Tell us what kind of problem you are having.
안녕하세요. Fixtures-monkey로 Jpa 연관관계가 있는 엔티티를 생성하고, 영속화를 해보는 중인데요.
// as-is val asIs = OrderProduct( name = name, quantity = quantity, order = order, ) // to-be val toBe = FixtureMonkey.builder() .plugin(KotlinPlugin()) .build() .giveMeBuilder<OrderProduct>() .set(OrderProduct::order, order) << 이부분 .sample()
as-is 와 같이 OrderProduct 객체를 생성하던 것을 to-be처럼 변경해봤습니다. 그런데, to-be는 다른 order 객체가 할당되는걸로 보이는데, 방법이 있을까요?
문의글 올리고 나서 우연히 공식문서에서 해결방법 찾았습니다. 🥲
val asIs = FixtureMonkey.builder() .plugin(KotlinPlugin()) .build() .giveMeBuilder<OrderProduct>() .set(OrderProduct::order, Values.just(order)) .sample()
Describe your question
Tell us what kind of problem you are having.
안녕하세요. Fixtures-monkey로 Jpa 연관관계가 있는 엔티티를 생성하고, 영속화를 해보는 중인데요.
as-is 와 같이 OrderProduct 객체를 생성하던 것을 to-be처럼 변경해봤습니다. 그런데, to-be는 다른 order 객체가 할당되는걸로 보이는데, 방법이 있을까요?
문의글 올리고 나서 우연히 공식문서에서 해결방법 찾았습니다. 🥲