Модель:
Код: Выделить всё
@Document
public class VideoStats {
@Id
private String id;
private String status;
// other fields...
}
Код: Выделить всё
@Repository
public interface VideoStatsRepository extends MongoRepository {
@Query("{ id: ?0}")
@Update("{ '$set': { status: ?1 } }")
void updateStatus(String id, String status);
}
Код: Выделить всё
Caused by: org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract void com.saravanan.video_creator.repositories.VideoStatsRepository.updateStatus(java.lang.String,java.lang.String); Reason: No property 'updateStatus' found for type 'VideoStats'
Подробнее здесь: https://stackoverflow.com/questions/789 ... sing-query
Мобильная версия