Repository navigation
v1.0.21
Fixed bugs
- Two relations under the same parent in one request no longer lose all but the last.
include=company.owner_team,company.countryis two includes ofcompany, and with
relationsFollowRuleson each of them fetched the company again and wrote it over the row, so
only the last one was there. Includes that ask nothing else of their parent are now made one
before anything is fetched - one request to the related model instead of two, and nothing to
write over. Without the rules the joins piled up on one query and both already arrived; that is
unchanged. An include with a filter, an ordering or a limit of its own stays as it was: those
belong to that one include, and folding two of them together would change what was asked.
Security
- A sub query followed by more is refused instead of answered wrongly. A comma ends a sub
query, soinclude=a?include=b,cisawithbunder it andcas an include of its own -
not, as it reads,bandcboth undera. Where the model being asked has nocthe
request failed; where it happened to have one, the answer came back withchanging off the
wrong row and nothing to say so. No encoding got round it: the comma is decoded long before the
parser sees it. It is now 422InvalidRequest, naming the dotted form that says either meaning.
Upgrade guide
include=a?include=b,cand anything else that puts a comma after an?include=sub query now
answers 422. Writea.b,a.cfor both undera, or put the plain include first, as
c,a?include=b. A sub query oforderingorfilterfollowed by a comma is untouched.- Nothing else to do. An
includethat was already right returns what it always did.
Full Changelog: v1.0.20...v1.0.21