Skip to content

Commit

Permalink
Faet: @manytoone -> @manytoone(fetch = FetchType.LAZY)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taekgil99 committed Nov 30, 2022
1 parent f22b78e commit 7f18dd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Order extends Auditable {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long orderId;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id")
private User user;

Expand Down Expand Up @@ -110,4 +110,4 @@ public boolean isShipping() {



}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class OrderProduct extends Auditable {
private Long orderProductId;

//1
@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "order_id")
private Order order;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "product_id")
private Product product;

Expand Down Expand Up @@ -50,8 +50,3 @@ public void cancel() {
//this.getProduct().addStock(quantity);//todo:재고추가로직만들기
}
}





0 comments on commit 7f18dd5

Please sign in to comment.