Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
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 }}
fastapi
/
sqlmodel
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
890
Star
18.3k
Code
Issues
1
Pull requests
54
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
✨ Allow specifying the
foreign_key
using an instance of
ForeignKey
- #894
#894
Open
earshinov
wants to merge 15 commits into
fastapi:main
fastapi/sqlmodel:main
from
earshinov:fk-attrs
earshinov/sqlmodel:fk-attrs
Copy head branch name to clipboard
Conversation
Commits
15
(15)
Checks
Files changed
Open
✨ Allow specifying the
foreign_key
using an instance of
ForeignKey
#894
earshinov
wants to merge 15 commits into
fastapi:main
fastapi/sqlmodel:main
from
earshinov:fk-attrs
earshinov/sqlmodel:fk-attrs
Copy head branch name to clipboard
Commits
Commits on Sep 1, 2025
✨Add `foreign_key_args` and `foreign_key_kwargs` arguments to `Field(...)` to let the user define additional `sqlalchemy.orm.ForeignKey` attributes, such as `ondelete` and `onupdate`, for foreign k…
Show description for 0e03bac
earshinov
authored and
Evgeny Arshinov
committed
0e03bac
View commit details
Copy full SHA for 0e03bac
Browse repository at this point
Commits on Sep 2, 2025
Alternative implementation: remove sa_column_fk_{args,kwargs}, allow the use to pass foreign_key=ForeignKey(...)
earshinov
committed
6a8878d
View commit details
Copy full SHA for 6a8878d
Browse repository at this point
Commits on Oct 27, 2025
Merge branch 'main' into fk-attrs
YuriiMotov
authored
9828b5a
View commit details
Copy full SHA for 9828b5a
Browse repository at this point
Clarify error message
YuriiMotov
committed
5b4509a
View commit details
Copy full SHA for 5b4509a
Browse repository at this point
Fix `This ForeignKey already has a parent` for `test_base_model_fk`
YuriiMotov
committed
5ff875e
View commit details
Copy full SHA for 5ff875e
Browse repository at this point
Simplify tests
YuriiMotov
committed
573bd10
View commit details
Copy full SHA for 573bd10
Browse repository at this point
Revert comment removal
YuriiMotov
committed
1d5add9
View commit details
Copy full SHA for 1d5add9
Browse repository at this point
Fix typing error
YuriiMotov
committed
34181b3
View commit details
Copy full SHA for 34181b3
Browse repository at this point
Commits on Jan 8, 2026
Merge branch 'main' into fk-attrs
YuriiMotov
authored
5b3ff03
View commit details
Copy full SHA for 5b3ff03
Browse repository at this point
Commits on Feb 2, 2026
Merge branch 'main' into fk-attrs
svlandeg
committed
58d4eec
View commit details
Copy full SHA for 58d4eec
Browse repository at this point
🎨 Auto format
pre-commit-ci-lite[bot]
authored
abf0d97
View commit details
Copy full SHA for abf0d97
Browse repository at this point
Commits on Feb 19, 2026
Merge branch 'main' into fk-attrs
YuriiMotov
authored
b0bf5bc
View commit details
Copy full SHA for b0bf5bc
Browse repository at this point
Commits on Feb 21, 2026
Merge remote-tracking branch 'upstream/main' into fk-attrs
YuriiMotov
committed
a3cdc01
View commit details
Copy full SHA for a3cdc01
Browse repository at this point
Fix `Optional` to Python 3.10+ syntax in test
YuriiMotov
committed
5331894
View commit details
Copy full SHA for 5331894
Browse repository at this point
Commits on Apr 3, 2026
Merge branch 'main' into fk-attrs
YuriiMotov
authored
cd9b262
View commit details
Copy full SHA for cd9b262
Browse repository at this point
You can’t perform that action at this time.