Repository navigation
Commit e757085
refactor(document): make the storage constructors final and internal
fromRow() and fromStorage() always build a plain Document with new self, so
a subclass override could only diverge from that; Collection, whose
constructor is now private, hydrates through Collection::fromArray() from the
document-type registry instead. fromRow() skips nested-document detection
because raw rows hold only scalars and encoded strings; callers building
documents from resolved relationship trees or user input keep using the
constructor.
The internal key set reads Attribute::$key, the property the value object
exposes once the getters are removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent ccc18c8 commit e757085
1 file changed
Lines changed: 6 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 123 | + | |
132 | 124 | | |
133 | 125 | | |
134 | 126 | | |
135 | 127 | | |
136 | 128 | | |
137 | | - | |
| 129 | + | |
138 | 130 | | |
139 | 131 | | |
140 | 132 | | |
| |||
170 | 162 | | |
171 | 163 | | |
172 | 164 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 165 | + | |
177 | 166 | | |
178 | 167 | | |
179 | 168 | | |
180 | 169 | | |
181 | 170 | | |
182 | | - | |
| 171 | + | |
183 | 172 | | |
184 | 173 | | |
185 | 174 | | |
| |||
0 commit comments