@stonyx/orm 0.3.2-alpha.76 → 0.3.2-alpha.78
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 +16 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1022,17 +1022,22 @@ per-record filter. An input you cannot identify must **deny**.
|
|
|
1022
1022
|
the other: after #235, `GET /animals/1?include=owner,owner.pets` returns
|
|
1023
1023
|
`owner.data: null` on every permitted animal it sideloads **and still
|
|
1024
1024
|
includes the hidden owner as a resource**.
|
|
1025
|
-
- **A computed attribute that interpolates a related record's id.**
|
|
1026
|
-
|
|
1027
|
-
is
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
framework
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1025
|
+
- **A computed attribute that interpolates a related record's id.**
|
|
1026
|
+
[#245](https://github.com/abofs/stonyx-orm/issues/245) owns this channel,
|
|
1027
|
+
and **it is open as this is written**. `relationships.*.data` is a structure
|
|
1028
|
+
this module builds, so it can be filtered; a computed property is arbitrary
|
|
1029
|
+
consumer code returning an arbitrary value. Whether that makes the channel a
|
|
1030
|
+
**framework defect** the ORM should close — by handing computed getters a
|
|
1031
|
+
verdict, or by refusing to run them while a filter is in force — or a
|
|
1032
|
+
**consumer contract** the ORM should only document, is the question #245
|
|
1033
|
+
must decide. **This README does not decide it; neither reading should be
|
|
1034
|
+
read out of the text here.** Measured on this repo's own fixture, where the
|
|
1035
|
+
`animal` model has a `get tag()` that interpolates `owner.id`: **every**
|
|
1036
|
+
animal document on **every** surface — including the ones above — carries
|
|
1037
|
+
`attributes.tag: "angela's small dog"` for an owner that answers `404`. That
|
|
1038
|
+
measurement is where #245 starts, and it holds whichever way the decision
|
|
1039
|
+
lands. Until it lands, if your access rules hide a record, audit your
|
|
1040
|
+
computed properties for its identifiers.
|
|
1036
1041
|
- **A bare `toJSON()` still emits unfiltered linkage, and that is deliberate.**
|
|
1037
1042
|
`Record.toJSON()` **applies** a verdict; it never **resolves** one. It has no
|
|
1038
1043
|
request, and the documented `access()` contract permits a predicate to read
|