Commit 3637df8
fix(omdb): getObjectByRef bound its PK expression — was reading an arbitrary row
getObjectByRef built the primary-key Expression from the ref but never set it on the
QueryOptions, so the read was an unfiltered "first row of the table" limited to 1 — it ignored
the reference entirely. Via the ObjectManager.deleteObject(getObjectByRef(c, ref)) delete-by-ref
path this meant deleting the WRONG object. Bind the expression to the QueryOptions so the read
resolves the referenced row, and (FR-017 TPH) scope it to the subtype so a ref-load can't surface
a sibling subtype's row from a shared single table.
The method's ref→metaobject name resolution runs through service discovery
(getMetaDataLoaderRegistry(ObjectRef.class)), which a manually-created test loader is not part of
— so the conformance harness deliberately passes MetaObject directly and never exercises this
verb, and there is no isolated test for it. The corrected read now uses the same
readMany(conn, mc, mapping, options-with-expression) path that getObjects/loadObject and the
roundtrip/update/delete write gates exercise green across the 23 persistence scenarios. omdb 46/0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent da00178 commit 3637df8
1 file changed
Lines changed: 9 additions & 5 deletions
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
398 | 402 | | |
399 | 403 | | |
400 | 404 | | |
| |||
0 commit comments