Created
June 7, 2019 22:10
-
-
Save wbruno/e09c0729d885988dbc055c52a84bdd99 to your computer and use it in GitHub Desktop.
StockRepository.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
interface StockRepository extends JpaRepository<Stock, Long> { | |
@Query(value = 'SELECT DISTINCT s FROM Stock s LEFT JOIN FETCH s.warehouse LEFT JOIN FETCH s.commitments WHERE s.sku IN (?1) AND s.organizationId = ?2') | |
List<Stock> findAllBySkuInAndOrganizationId(Set<String> skus, Long organizationId) | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment