Skip to main content

MongoDB

MongoDB With Spring Dataโ€‹

  • Both the @Query and @Aggregation annotations can be used to build queries, but the @Aggregation one provides access to more logic, such as limits and offsets (skip) (source, StackOverflow).
  • Alternatively for pagination, a Pageable argument can be supplied.