I want to write custom query on spring data mongodb. Something like this:
public interface CarRepo extends MongoRepository<Car, String> {
@Query("select distinct(brand) from Car ")
public List<String> findDistinctBrand();
}
But it's throwing an error "Caused by: com.mongodb.util.JSONParseException:
". How can I achieve that?