Add namespace to the type checking error

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Gone away
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • 1
    • Not Needed
    • Developer Tools

      public List<Document> queryMoviesByYear(String year) {
              return client
                  .getDatabase("sample_mflix")
                  .getCollection("movies")
                  .aggregate(List.of(
                      createMatchStage(year),
                      createGroupStage(),
                      createProjectStage(),
                      createSortStage()
                  ))
                  .into(new ArrayList<>());
          }
      
          public List<Document> queryCommentsByYear(String year) {
              return client
                  .getDatabase("sample_mflix")
                  .getCollection("comments")
                  .aggregate(List.of(
                      createMatchStage(year),
                      createGroupStage(),
                      createProjectStage(),
                      createSortStage()
                  ))
                  .into(new ArrayList<>());
          }
      
          private Bson createMatchStage(String year) {
              return Aggregates.match(Filters.eq("year", year));
          }
      
          private Bson createGroupStage() {
              return Aggregates.group("newField",
                  Accumulators.avg("test", "$year"),
                  Accumulators.sum("test2", "$year"),
                  Accumulators.bottom("field", Sorts.ascending("year"), "$year")
              );
          }
      
          private Bson createProjectStage() {
              return Aggregates.project(Projections.fields(Projections.include("year", "plot")));
          }
      
          private Bson createSortStage() {
              return Aggregates.sort(Sorts.orderBy(Sorts.ascending("asd", "qwe")));
          }
      

      Combines the errors of both queries. We would want to add the namespace to the type checking error because it's not clear where the error is coming from.

              Assignee:
              Unassigned
              Reporter:
              Kevin Mas Ruiz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: