René's URL Explorer Experiment


Title: Different response model behaviour on Mac vs Ubuntu when joining tables · Issue #379 · fastapi/sqlmodel · GitHub

Open Graph Title: Different response model behaviour on Mac vs Ubuntu when joining tables · Issue #379 · fastapi/sqlmodel

X Title: Different response model behaviour on Mac vs Ubuntu when joining tables · Issue #379 · fastapi/sqlmodel

Description: First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated search. I already searched in Google "How to X in...

Open Graph Description: First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated search. I...

X Description: First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated searc...

Opengraph URL: https://github.com/fastapi/sqlmodel/issues/379

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Different response model behaviour on Mac vs Ubuntu when joining tables","articleBody":"### First Check\r\n\r\n- [X] I added a very descriptive title to this issue.\r\n- [X] I used the GitHub search to find a similar issue and didn't find it.\r\n- [X] I searched the SQLModel documentation, with the integrated search.\r\n- [X] I already searched in Google \"How to X in SQLModel\" and didn't find any information.\r\n- [X] I already read and followed all the tutorial in the docs and didn't find an answer.\r\n- [X] I already checked if it is not related to SQLModel but to [Pydantic](https://github.com/samuelcolvin/pydantic).\r\n- [X] I already checked if it is not related to SQLModel but to [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy).\r\n\r\n### Commit to Help\r\n\r\n- [X] I commit to help with one of those options 👆\r\n\r\n### Example Code\r\n\r\n```python\r\n# Example interleaved with the description\r\n```\r\n\r\n\r\n### Description\r\n\r\nI have these models:\r\n\r\n```python\r\nclass SourceBase(SQLModel):\r\n    name: str = Field(nullable=False)\r\n    url: str = Field(nullable=False, sa_column_kwargs={\"unique\": True})\r\n\r\n\r\nclass Source(SourceBase, table=True):\r\n    id: Optional[int] = Field(default=None, primary_key=True)\r\n    users: List[\"User\"] = Relationship(back_populates=\"sources\", link_model=UserSourceLink)\r\n    articles: List[\"Article\"] = Relationship(back_populates=\"source\")\r\n\r\n\r\nclass SourceGet(SourceBase):\r\n    id: int\r\n\r\n\r\nclass ArticleBase(SQLModel):\r\n    title: str = Field(nullable=False)\r\n    url: str = Field(nullable=False, sa_column_kwargs={\"unique\": True})\r\n    published_date: str = Field(nullable=False)\r\n    read: bool = Field(default=False, nullable=False)\r\n    source_id: Optional[int] = Field(default=None, foreign_key=\"source.id\")\r\n\r\n\r\nclass Article(ArticleBase, table=True):\r\n    id: Optional[int] = Field(default=None, primary_key=True)\r\n    source: Source = Relationship(back_populates=\"articles\")\r\n\r\n\r\nclass ArticleRead(ArticleBase):\r\n    id: int\r\n\r\nclass ArticleReadWithSource(ArticleGet):\r\n    source: Optional[SourceGet] = None\r\n```\r\n\r\nI have a function that selects all rows from the article table: \r\n\r\n```python\r\ndef select_all_articles(offset, limit, session: Session) -> List:\r\n    statement = select(Article).order_by(Article.published_date.desc()).offset(offset).limit(limit)\r\n    results = session.exec(statement).all()\r\n    return results\r\n```\r\n\r\nI have another function which returns these rows along with the source to which they get joined:\r\n\r\n```python\r\n@router.get(\"/\", response_model=List[ArticleReadWithSource])\r\ndef get_all_articles(\r\n    offset: int = 0,\r\n    limit: int = Query(default=100, lte=100),\r\n    session: Session = Depends(db.get_session),\r\n    current_user: User = Depends(get_current_user),\r\n) -> List:\r\n    articles = db.select_all_articles(offset, limit, session)\r\n    return articles\r\n```\r\n\r\nThis works perfectly on my local machine (macOS Montery):\r\n![image](https://user-images.githubusercontent.com/17177967/179416711-6abd024b-a7d2-4686-b80d-1a09a5719d19.png)\r\n\r\nHowever, when running this same code on a remote Ubuntu 20.04 machine, the join seems to silently fail and the source object is returned as a `null` \r\n![image](https://user-images.githubusercontent.com/17177967/179416757-5272c9a8-62e9-415a-8a2d-c4631193526c.png)\r\n\r\nHas anyone ever seen any behaviour like this? The code is identical on each machine so I'm struggling to think of ways to debug this\r\n\r\n### Operating System\r\n\r\nLinux\r\n\r\n### Operating System Details\r\n\r\n_No response_\r\n\r\n### SQLModel Version\r\n\r\n0.06\r\n\r\n### Python Version\r\n\r\n3.10.5\r\n\r\n### Additional Context\r\n\r\n_No response_","author":{"url":"https://github.com/HenryDashwood","@type":"Person","name":"HenryDashwood"},"datePublished":"2022-07-17T17:08:51Z","url":"https://github.com/fastapi/sqlmodel/issues/379"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:508b331d-0c6d-b3e1-ddf0-a27dceeb1a10
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAE50:1E492C:1BAB00:25D2FD:6AFE17C7
html-safe-nonce3086ae11cd7a23046c24f99db13aec45958c3f0bfaf8cd76fdfcc9244a53f384
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTUwOjFFNDkyQzoxQkFCMDA6MjVEMkZEOjZBRkUxN0M3IiwidmlzaXRvcl9pZCI6IjgwMjQ1MDIwNDE5MDI0NTQ3MjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd2af4793f9e9b5e8e0597a1096b3f932602fbe278615eeaa71a54c8aaf454e03
hovercard-subject-tagissue:1307158163
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/fastapi/sqlmodel/379/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5b50817899c465ee58f7abb342d20f13712e34ef2c892fa840726774be39ec78/fastapi/sqlmodel/issues/379
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5b50817899c465ee58f7abb342d20f13712e34ef2c892fa840726774be39ec78/fastapi/sqlmodel/issues/379
og:image:altFirst Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated search. I...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameHenryDashwood
hostnamegithub.com
expected-hostnamegithub.com
None3cd8a1d79ccbf9aecac62781f79072482a49047fb982b8c9e2ad4aca8bf6a9af
turbo-cache-controlno-preview
go-importgithub.com/fastapi/sqlmodel git https://github.com/fastapi/sqlmodel.git
octolytics-dimension-user_id156354296
octolytics-dimension-user_loginfastapi
octolytics-dimension-repository_id399495186
octolytics-dimension-repository_nwofastapi/sqlmodel
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id399495186
octolytics-dimension-repository_network_root_nwofastapi/sqlmodel
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release05539640a34afe6142a519483d78ddd766a1304a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/fastapi/sqlmodel/issues/379#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffastapi%2Fsqlmodel%2Fissues%2F379
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffastapi%2Fsqlmodel%2Fissues%2F379
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=fastapi%2Fsqlmodel
Reloadhttps://github.com/fastapi/sqlmodel/issues/379
Reloadhttps://github.com/fastapi/sqlmodel/issues/379
Reloadhttps://github.com/fastapi/sqlmodel/issues/379
fastapihttps://github.com/fastapi
sqlmodelhttps://github.com/fastapi/sqlmodel
Codehttps://github.com/fastapi/sqlmodel
Issues1 (1)https://github.com/fastapi/sqlmodel/issues
Pull requests53 (53)https://github.com/fastapi/sqlmodel/pulls
Discussionshttps://github.com/fastapi/sqlmodel/discussions
Actionshttps://github.com/fastapi/sqlmodel/actions
Projectshttps://github.com/fastapi/sqlmodel/projects
Security and qualityhttps://github.com/fastapi/sqlmodel/security
Insightshttps://github.com/fastapi/sqlmodel/insights
https://github.com/fastapi/sqlmodel
New issuehttps://github.com/login?return_to=https://github.com/fastapi/sqlmodel/issues/379
New issuehttps://github.com/login?return_to=https://github.com/fastapi/sqlmodel/issues/379
Different response model behaviour on Mac vs Ubuntu when joining tableshttps://github.com/fastapi/sqlmodel/issues/379#top
questionFurther information is requestedhttps://github.com/fastapi/sqlmodel/issues?q=state%3Aopen%20label%3A%22question%22
https://github.com/HenryDashwood
HenryDashwoodhttps://github.com/HenryDashwood
on Jul 17, 2022https://github.com/fastapi/sqlmodel/issues/379#issue-1307158163
Pydantichttps://github.com/samuelcolvin/pydantic
SQLAlchemyhttps://github.com/sqlalchemy/sqlalchemy
https://user-images.githubusercontent.com/17177967/179416711-6abd024b-a7d2-4686-b80d-1a09a5719d19.png
https://user-images.githubusercontent.com/17177967/179416757-5272c9a8-62e9-415a-8a2d-c4631193526c.png
HenryDashwoodhttps://github.com/HenryDashwood
questionFurther information is requestedhttps://github.com/fastapi/sqlmodel/issues?q=state%3Aopen%20label%3A%22question%22
on Jul 17, 2022https://github.com/fastapi/sqlmodel/issues/379#event-7007733485
https://github.com/antont
antonthttps://github.com/antont
on Jul 18, 2022https://github.com/fastapi/sqlmodel/issues/379#issuecomment-1187038643
#315https://github.com/fastapi/sqlmodel/issues/315
https://github.com/HenryDashwood
HenryDashwoodhttps://github.com/HenryDashwood
on Aug 25, 2022https://github.com/fastapi/sqlmodel/issues/379#issuecomment-1226632486
YuriiMotovhttps://github.com/YuriiMotov
completedhttps://github.com/fastapi/sqlmodel/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 8, 2025https://github.com/fastapi/sqlmodel/issues/379#event-19057528947
Sign up for freehttps://github.com/signup?return_to=https://github.com/fastapi/sqlmodel/issues/379
Sign in to commenthttps://github.com/login?return_to=https://github.com/fastapi/sqlmodel/issues/379
questionFurther information is requestedhttps://github.com/fastapi/sqlmodel/issues?q=state%3Aopen%20label%3A%22question%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.