Skip to content

Commit a803a43

Browse files
authored
Merge pull request #76 from AnswerConsulting/BENCH-184
BENCH-184 getting order 500 error fixed on all endpoints.
2 parents 0721b8c + 5e79781 commit a803a43

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/java/com/answerdigital/answerking/model/LineItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class LineItem {
4040
@JsonIgnore
4141
private Order order;
4242

43-
@ManyToOne(fetch = FetchType.LAZY, optional = false)
43+
@ManyToOne(fetch = FetchType.EAGER, optional = false)
4444
@JoinColumn(name = "product_id")
4545
private Product product;
4646

src/main/java/com/answerdigital/answerking/service/OrderService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public Order addProductToBasket(final Long orderId, final Long productId, final
7979
return orderRepository.save(order);
8080
}
8181

82+
@Transactional
8283
public Order updateProductQuantity(final Long orderId, final Long productId, final Integer productQuantity) {
8384
final Order order = findById(orderId);
8485
final Product product = productService.findById(productId);

0 commit comments

Comments
 (0)