Changelog - 2026-09-17
Paging, bulk writes and relation settings
Fix Contract SecurityIn one line. Paging stays stable, bulk routes accept long id lists, and an included relation no longer leaks hidden columns or other tenants' rows.
What changed
- Paging over a tied order returns every row once (Fix).
order: ['status ASC']left ties to the database, and 60 rows read 7 at a time came back as 50 distinct. The relational repository now appendsid ASCwhen the order does not nameid, so equal rows come back inidorder. PATCH /andDELETE /takewherein the body (Contract). Awherewith hundreds of ids does not fit in a URL. The generated bulk routes read it from the query or the JSON body.- Included relations keep their model settings (Security).
includelooked a relation's@modelsettings up by SQL table name, so a model whose table name differed losthiddenProperties(returned),scopeFilter(ignored, so other tenants' rows came back),defaultFilteranddefaultLimit. Models are now found by their schema object. A model whoseTABLE_NAMEmatches its table was never affected.
| Request | Answer |
|---|---|
where in the query | as before |
where in the body | same as the query |
where in both | 400 |
where in neither | 400 |
http
PATCH /products
{ "where": { "id": { "inq": ["...2000 ids"] } }, "status": "ACTIVE" }
DELETE /products
{ "where": { "id": { "inq": ["...2000 ids"] } } }Who is affected
- Anyone paging with a non-unique order. Rows with equal sort values now come back in
idorder. - Anyone using
includewith a model whoseTABLE_NAMEdiffers from its table. Its hidden columns and row scope now apply. - You override
updateByordeleteByand readvalid('query')yourself. You still see only the query. UseresolveBulkWhere({ context, where: { fromQuery, fromBody } })to accept both. Without it, a body-only request reaches the repository with nowhere, and the repository refuses it (400).
Details
- In a
PATCH /body,whereis reserved: it selects rows and is never written. DELETE /declares no body schema, so a client sendingcontent-type: application/jsonwith no body still gets200. Nameroutes.deleteBy.request.bodyto get the Swagger editor back, and accept that the media type is then gated.