Commit a0b48ed
fix: normalize tenant to string to match database round-trip type
setTenant() accepts int|string|null but PDO returns tenant as a string
after storage. The strict !== comparisons in getCollection() then fail
because (int)1 !== "1", causing "Collection not found" errors. The
Sequence validator also rejects integer tenant values since $tenant
has type VAR_ID which requires strings.
Cast tenant to string in Adapter::setTenant(), Document::getTenant(),
and the tenantPerDocument document paths. Skip Sequence validation for
$tenant since it's a user-provided identifier, not a sequence-generated
ID.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bab244a commit a0b48ed
File tree
4 files changed
+24
-11
lines changed- src/Database
- Validator
4 files changed
+24
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
1253 | | - | |
| 1253 | + | |
1254 | 1254 | | |
1255 | | - | |
| 1255 | + | |
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
| |||
5503 | 5503 | | |
5504 | 5504 | | |
5505 | 5505 | | |
| 5506 | + | |
5506 | 5507 | | |
5507 | 5508 | | |
5508 | | - | |
| 5509 | + | |
5509 | 5510 | | |
5510 | 5511 | | |
5511 | 5512 | | |
| 5513 | + | |
| 5514 | + | |
| 5515 | + | |
5512 | 5516 | | |
5513 | 5517 | | |
5514 | 5518 | | |
| |||
5621 | 5625 | | |
5622 | 5626 | | |
5623 | 5627 | | |
5624 | | - | |
| 5628 | + | |
| 5629 | + | |
5625 | 5630 | | |
5626 | 5631 | | |
| 5632 | + | |
5627 | 5633 | | |
5628 | 5634 | | |
5629 | 5635 | | |
| |||
7198 | 7204 | | |
7199 | 7205 | | |
7200 | 7206 | | |
7201 | | - | |
| 7207 | + | |
| 7208 | + | |
7202 | 7209 | | |
7203 | 7210 | | |
| 7211 | + | |
7204 | 7212 | | |
7205 | 7213 | | |
7206 | 7214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
| |||
0 commit comments