FieldSchema emits relation entries
Auto-generated from the source archive. Do not edit by hand — rerun
catalyst-changelog-syncinstead.
What changed
Section titled “What changed”- Every YAML property declaring
relationshipnow produces a{ type: 'relation', cardinality, target: () => <Aggregate>FieldSchema }entry in the generated*.field-schema.ts, alongside the existing scalar entries. - Shape 1 (FK scalar +
relationshipblock) keeps its scalar FK entry and adds the relation entry next to it; shape 2 (type: 'relationship') emits a single relation. Cardinality mapsmany-to-one/one-to-oneowning →'one'andone-to-many/many-to-many→'many'. Invalid combinations (one-to-many or many-to-many with a scalar FK, many-to-one declared as shape 2) fail generation with a descriptive error. - Imports between sibling schemas resolve to the top-level
@app/<modulePath>barrel (closest-to-root) and thetargetfield is wrapped in a thunk so circular references between aggregates load without runtime errors.
Why it matters
Section titled “Why it matters”Recursive formatRecord and sanitizeRecord in @aurorajs.dev/core-back now have something to recurse into: nested includes are validated and stripped per the target aggregate’s own field schema. The P0 leak that exposed password hashes through any include of a relation containing a hashed field is closed once you regenerate. Modules that do not regenerate keep the legacy non-recursive pipeline. The CLI bumps its required minimum of @aurorajs.dev/core-back to the version that ships the recursive pipeline.