Repository navigation
Release v7.60.0
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 withBuilders<T>,FindandAggregatepipelines instead ofAsQueryable(), which fails at request time withExpression not supportedfor 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-pagingfor paging MongoDB without LINQ: returncollection.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,LimitorOrderByto serve the client's page or sort. The old advice to give every list a defaultOrderByis removed; an initial order is the frontend'ssortingargument touseWithPaging. - The
AsQueryable()examples in the paging skill andvertical-slices.mdnow showObserve, andIQueryable<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 orSkip/Takeas how a query pages. - The paging skill documents the
Expression not supported ... Skip(0).Take(30).Cast()failure: Arc before 22.50.6 appended aCastthat MongoDB cannot translate to every pagedIQueryablerequest.