Skip to content

feat(query): concrete With* relation fields and reverse FK naming#32

Merged
themixednuts merged 1 commit into
mainfrom
feat/query-row-relation-fields
Jul 21, 2026
Merged

feat(query): concrete With* relation fields and reverse FK naming#32
themixednuts merged 1 commit into
mainfrom
feat/query-row-relation-fields

Conversation

@themixednuts

Copy link
Copy Markdown
Owner

Summary

  • Return assembled *With* structs from find_many/find_first so loaded relations are normal fields (user.posts) instead of QueryRow trait methods
  • Auto-disambiguate reverse FKs for multi-FK and self-referential columns (author_posts, invited_by_complexes)
  • Add relation = "..." override with RELATION attr hover docs (same pattern as REFERENCES)

Test plan

  • SQLite: multi_fk_reverse, self_ref_reverse, existing reverse/forward relation tests
  • Postgres (postgres-sync + tokio-postgres): same focused tests
  • CI green on this PR

Return assembled *With* structs from find_many/find_first so loaded
relations are normal fields (user.posts) instead of QueryRow methods.

Also generate reverse accessors for multi-FK and self-referential
columns, with optional relation = override and RELATION hover docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@themixednuts
themixednuts merged commit ee9b658 into main Jul 21, 2026
21 checks passed
@themixednuts
themixednuts deleted the feat/query-row-relation-fields branch July 21, 2026 07:06
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