You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 43177a9
Browse filesBrowse the repository at this point in the historyBrowse files
feat(metadata): rename @dbSetName to @collectionName and add the naming.collections pluralizer
Renames the unreleased @dbSetName to @collectionName (no alias) and registers it in
every port on object.entity, object.projection and object.report, marked
implementedIn csharp: the generated C# context takes it as the DbSet property name.
A project chooses the pluralizer an object without one takes its name from with
naming.collections in .metaobjects/config.json (standard by default, none, or one
the application registers); every port reads the key and refuses an unknown name.
The shared fixture object-port-scoped-attr-dbsetname becomes object-collection-name,
and object-port-scoped-attr-object-adapter keeps the port-scoped marker covered.
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ PyPI has had no product change since `0.25.0` — nothing is broken.
71
71
-**Kotlin** — `codegen-kotlin` (KotlinPoet on JVM): entity + Exposed table + Spring controller + payload + relations + filter allowlist + validator + stored-proc + output-parser generators. `integration-tests-kotlin` runs the persistence-conformance corpus through Exposed against Testcontainers Postgres.
72
72
73
73
**Cross-port conformance corpora** (every port runs the shared corpus):
74
-
- Metamodel: `fixtures/conformance/` (454 fixtures; 38 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
74
+
- Metamodel: `fixtures/conformance/` (455 fixtures; 38 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
- Persistence: `fixtures/persistence-conformance/`. **Query** scenarios run on every port (TS / C# / Java / Kotlin / Python), each provisioning its test DB by executing the committed, TS-produced `canonical/schema.postgres.sql` (Postgres only — Derby dropped for the cross-port query corpus, ADR-0015; the FR-044 `report-*` scenarios also run on SQLite, MySQL and D1 where a port has the engine, see [docs/CONFORMANCE.md](docs/CONFORMANCE.md)). The **migration** scenarios are exercised by **TS only** (TS owns schema migrations). **The corpus now gates WRITES, not just reads (SP-H):** an `op: roundtrip` scenario type INSERTs through each port's runtime/ORM write codec (NOT raw SQL), reads the row back, and asserts the wire-normalized value. The `AllTypes` entity (`roundtrip-all-types.yaml`) carries one field of **every** persistable `field.*` subtype — string/int/long/double/float/decimal/boolean/date/time/timestamp(+tz)/currency/enum/uuid/object — plus an **array-of-VO** `field.object @isArray @storage:jsonb` column (`labels`, written as 2-element / empty-`[]` / single-element arrays across the three rows) — so every subtype write+read (incl. the array-of-value-object jsonb codec) round-trips through every port against Testcontainers PG. (`field.byte`/`field.short`/`field.class` were cut as non-functional registration-only stubs — the matrix tracks only genuinely-supported subtypes; see `fixtures/registry-conformance/README.md` → "Per-subtype write-round-trip matrix".)
77
77
- API-contract: `fixtures/api-contract-conformance/`. TS / C# / Java / Kotlin / Python all green — each port runs **two lanes**: a hand-rolled reference server AND its **generated** API artifact booted over HTTP (the deployed controller/routes; TS+C# full-stack vs Testcontainers PG, Java/Kotlin/Python generated controller + in-memory repo behind the consumer seam). The generated fan-out found 10 real deployment bugs golden snapshots missed. Three sub-corpora run the **generated lane only, on all five ports** — `write-through/`, `projection/` (F22: a view-only `object.projection` serves GET list + GET by id and answers every write verb with `405 {"error": "method_not_allowed"}`) and `report/` (FR-044: a view-backed `object.report` serves GET list, answers `POST` with that same `405`, and mounts no `/{id}` route). That is deliberate, not a gap: what is under test is whether a port's GENERATOR emits those routes, and a hand-rolled reference server would answer every scenario by construction. The `m2m/` sub-corpus also gates **TPH x M:N together** (base-declared, subtype-declared, abstract-mid-declared, a non-subtype source onto a subtype TARGET, and the cross-subtype source id answering `200 []`) — the two corpora were originally built disjoint (`tph/` had no relationships, `m2m/` no discriminators), which is precisely how that defect class survived.
|`requirement-*`, `error-unknown-attr-requirement`|[features/requirements.md](features/requirements.md) (vocabulary only — the gate has its own corpus, `requirement-check-conformance/`; see "Split coverage" above) |
377
377
|`reporting-*`, `error-dimension-*`, `error-measure-*`, `error-ratio-*`, `error-segment-*`, `error-report-*`, `error-relative-date-*`|[features/reporting.md](features/reporting.md) (the `dimension` / `measure` / `segment` / `object.report` vocabulary and its load-time rules; design in the [FR-044 spec](superpowers/specs/2026-10-02-fr-044-core-reporting-design.md)) |
378
378
|`provider-extension-*`, `provider-custom-vocabulary-*`|[features/extending-with-providers.md](features/extending-with-providers.md) (a project's own provider: a new subtype plus attributes on an existing type load with it and are refused without it, every port writing the provider in its own language) |
379
+
|`object-collection-name`|[features/migrations/physical-naming.md](features/migrations/physical-naming.md) (`@collectionName` and the `collections` pluralizer) |
Copy file name to clipboardExpand all lines: docs/features/migrations/physical-naming.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ every runtime `ObjectManager` and `verify` read it, so they always produce the s
27
27
|---|---|---|---|
28
28
|`columns`|`snake_case`, `literal`, `kebab-case`, `pascal`, or a name your application registered | a field with no `@column`|`snake_case`|
29
29
|`tables`|`snake_case`, `literal`, or a name your application registered | a source with no `@table`/`@view`/`@proc`/`@function`: its `name`, else the object's name made plural |`snake_case`|
30
+
|`collections`|`standard`, `none`, or a name your application registered | an object with no `@collectionName`: the collection name the generated C# DbSet takes |`standard`|
30
31
31
32
An unknown key fails when the file is read, and so does a name no registered strategy answers.
32
33
Index and constraint names are unchanged.
@@ -61,7 +62,9 @@ and is `pascal` otherwise:
61
62
62
63
Table rules register the same way (`namingStrategies.tables`, `RegisterTables`, `registerTables`,
63
64
`register_table_naming_rule`) and name a source with no physical name; the entity-name fallback
64
-
is still made plural after the rule. A built-in name cannot be replaced. Register the same
65
+
is still made plural after the rule. Pluralizers register the same way (`registerPluralizer`, `RegisterPluralizer`,
66
+
`registerPluralizer`, `register_pluralizer`): an object name in, in its declared casing, its
67
+
collection name out. `standard` is the cross-port plural and `none` keeps the name as it is. A built-in name cannot be replaced. Register the same
65
68
strategy in every port that reads the database, because each port resolves the names itself.
66
69
Every port looks a strategy up by name each time it applies one, so registering again under the
67
70
same name replaces it for everything that runs afterwards. A test that registers its own calls
0 commit comments