Skip to content

[codex] Name generated relationships from journey fields - #2

Draft
sharziki wants to merge 1 commit into
mainfrom
codex/next-journey-step
Draft

[codex] Name generated relationships from journey fields#2
sharziki wants to merge 1 commit into
mainfrom
codex/next-journey-step

Conversation

@sharziki

@sharziki sharziki commented Jun 9, 2026

Copy link
Copy Markdown
Owner

What changed

  • Updates FastAPI model generation so reference fields use the Journey field name for SQLAlchemy relationship attributes.
  • Preserves the existing <field>_id foreign key column shape.
  • Adds a regression test covering owner = relationship("User") and workspace = relationship("Workspace") output.

Why

Journey output and downstream route code refer to relationships by source field names, such as invitation.workspace. The previous <field>_rel attribute naming drifted from the journey contract.

Validation

  • pytest -q -> 48 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant