java.lang.IllegalArgumentException: Owning type must not be null!
解决方法:
MongoRepository使用@Query查询语句时报错,原来是setting中的属性title不存在
@Component
public interface QuestionDao extends MongoRepository<Question,String> {
@Query(value="{'$and': [{ 'surveyId':?0},{'setting.title':?1}]}",fields="{ '_id' : 1}")
public List<Question> getQuestionListBySurveyIdAndOptLimit(Long surveyId,String title);
}