Skip to content

Commit

Permalink
changed refactored shopping cart service
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorovychh committed Jan 2, 2024
1 parent feb3aaf commit 5480907
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.app.bookstore.repository.shopping.cart;

import com.app.bookstore.model.ShoppingCart;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface ShoppingCartRepository extends JpaRepository<ShoppingCart, Long> {
@Query("SELECT sc FROM ShoppingCart sc JOIN FETCH sc.cartItems ci WHERE sc.user.id = :userId")
Expand Down

0 comments on commit 5480907

Please sign in to comment.