@stonyx/orm 0.3.2-alpha.83 → 0.3.2-alpha.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -967,11 +967,29 @@ per-record filter. An input you cannot identify must **deny**.
|
|
|
967
967
|
([#232](https://github.com/abofs/stonyx-orm/issues/232)). This is
|
|
968
968
|
**membership**: the related resource is the route's *primary* data, so the
|
|
969
969
|
filter decides whether it is served at all, not merely which ids a document
|
|
970
|
-
may name. A denied `hasMany` member is **dropped from the array**
|
|
971
|
-
|
|
972
|
-
|
|
970
|
+
may name. A denied `hasMany` member is **dropped from the array** and nothing
|
|
971
|
+
in the relationship marks the drop: `links` intact, no `errors` member, same
|
|
972
|
+
status, and an array of survivors shaped exactly like one from a parent that
|
|
973
|
+
only ever had those members. A denied `belongsTo` target answers **`200` with
|
|
973
974
|
`data: null`**, byte-identical to a target that is genuinely absent, for the
|
|
974
|
-
same reason.
|
|
975
|
+
same reason.
|
|
976
|
+
|
|
977
|
+
**That is a claim about the relationship, not about the document, and the gap
|
|
978
|
+
is measurable in this repo's own fixture.** `owner` declares a computed
|
|
979
|
+
`totalPets` returning `this.pets.length`, which reads the **store** and is
|
|
980
|
+
never filtered. Measured on this branch, unauthenticated, at zero query
|
|
981
|
+
parameters: `GET /owners/gina` answers `attributes.totalPets: 5` while its
|
|
982
|
+
`relationships.pets.data` names **four** ids, and both relationship routes
|
|
983
|
+
serve the same four. The relationship discloses nothing; the document it
|
|
984
|
+
arrives in discloses that exactly one child was withheld. Do not read
|
|
985
|
+
"indistinguishable" as a property of the response — it is a property of the
|
|
986
|
+
relationship member alone. The other channels in the same class are
|
|
987
|
+
[#245](https://github.com/abofs/stonyx-orm/issues/245) (computed attributes,
|
|
988
|
+
which is the one measured above),
|
|
989
|
+
[#233](https://github.com/abofs/stonyx-orm/issues/233) (`included`
|
|
990
|
+
membership) and [#246](https://github.com/abofs/stonyx-orm/issues/246) (the
|
|
991
|
+
absence of `attributes.<fk>` on a `POST` response), all open. **Audit your
|
|
992
|
+
computed properties before you treat a dropped member as unobservable.** Nothing on either family errors and no status changes — the
|
|
975
993
|
status on these routes belongs to the **parent**, and `data` carries the
|
|
976
994
|
answer about the related record. The `/relationships/` family built its `{type, id}` by
|
|
977
995
|
hand rather than through `toJSON()`, which is why the linkage filter shipped in
|