findByName(…)
과 같은 스프링 데이터 저장소의 메소드를 만들면 모든 것이 잘 동작합니다. findByField1AndName(…)
를 사용하지만 봄 데이터 MongoDB를은 마지막 매개 변수에 대한 쿼리를 생성Spring MongoDB 저장소 쿼리 연결은 어떻게 작동합니까?
{ name : 'qwerty' }
그러나 나는 그것이
{ field1 : 'something', name : 'querty' }
문제가 무엇
를 생성 예상? 도와주세요. 누군가가 이러한 문제를 가지고 있다면, 당신은 수동으로 쿼리를 작성하는 @query 주석을 사용할 수 있습니다 , 아래의 예는 :UPD1는
@Query("{ region: ?0, product: ?1, direction: ?2, deliveryCondition: ?3, sortament: ?4}")
QuotationKey findByRegionAndProductAndMarketDirectionAndDeliveryConditionAndSortament(
Geography region, Product product, MarketDirection direction,
DeliveryCondition deliveryCondition, Sortament sortament);
spring-data-mongodb 1.0.3.RELEASE를 사용했는데 아직 버그가있는 것 같습니다. – Andrey
그렇게 생각한다면 포함 된 테스트 사례와 함께 버그를 제출하십시오 :). –