Skip to content

Release v7.60.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 07:43
8e7d440

Cratis guidance now prefers the native MongoDB driver API over LINQ, and states that Arc, not the query, owns paging and sorting.

Added

  • A MongoDB rule (mongodb.md): query with Builders<T>, Find and Aggregate pipelines instead of AsQueryable(), which fails at request time with Expression not supported for anything the driver cannot translate. It is registered with the backend developer and code reviewer agents and the rule index.
  • Guidance in cratis-arc-query-paging for paging MongoDB without LINQ: return collection.Observe(<FilterDefinition>) and let Arc apply the client's sort, page and size. Sorting resolves the BSON element name, so concept-typed members sort by their stored value, and ties break on _id.
  • An eval and a trigger for a paged MongoDB query that fails with Expression not supported.

Changed

  • A query never writes Skip, Take, Limit or OrderBy to serve the client's page or sort. The old advice to give every list a default OrderBy is removed; an initial order is the frontend's sorting argument to useWithPaging.
  • The AsQueryable() examples in the paging skill and vertical-slices.md now show Observe, and IQueryable<T> is described as the shape for LINQ-native providers such as Entity Framework Core.
  • The React, code review, performance review and read-model query guidance, and the performance reviewer agent, no longer present IQueryable<T> as the only paged shape or Skip/Take as how a query pages.
  • The paging skill documents the Expression not supported ... Skip(0).Take(30).Cast() failure: Arc before 22.50.6 appended a Cast that MongoDB cannot translate to every paged IQueryable request.