FIX
This commit is contained in:
@@ -43,7 +43,7 @@ public class StockServiceImpl implements StockService{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Stock findByRef(String ref) {
|
public Stock findByRef(String ref) {
|
||||||
Stock stock = stockRepository.findByRefEQ(ref);
|
Stock stock = stockRepository.findByRef(ref);
|
||||||
if (stock == null) {
|
if (stock == null) {
|
||||||
throw new EntityNotFoundException("Ref non valide");
|
throw new EntityNotFoundException("Ref non valide");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ import java.util.List;
|
|||||||
@Repository
|
@Repository
|
||||||
public interface StockRepository extends MongoRepository<Stock,Long> {
|
public interface StockRepository extends MongoRepository<Stock,Long> {
|
||||||
List<Stock> findByNameIsContainingIgnoreCaseAndIsRentFalse(String name);
|
List<Stock> findByNameIsContainingIgnoreCaseAndIsRentFalse(String name);
|
||||||
Stock findByRefEQ(String ref);
|
Stock findByRef(String ref);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user