Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not initialize FKs to null #10337

Merged
merged 6 commits into from
Nov 28, 2024
Merged

fix: do not initialize FKs to null #10337

merged 6 commits into from
Nov 28, 2024

Conversation

thetutlage
Copy link
Contributor

@thetutlage thetutlage commented Nov 28, 2024

Fixes: FRMW-2812

This PR changes how the foreign keys are hydrated on a model instance when you fetch data from the database.

  • The foreign key is set when you explicitly select it.
  • The foreign key is set when you explicitly select its relationship. Even if the relationship doesn't exist and set to null.

Copy link

changeset-bot bot commented Nov 28, 2024

⚠️ No Changeset found

Latest commit: 83d2296

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Nov 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 10:40am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Nov 28, 2024 10:40am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 28, 2024 10:40am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 28, 2024 10:40am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 28, 2024 10:40am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 28, 2024 10:40am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Nov 28, 2024 10:40am

Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@thetutlage thetutlage merged commit d57c739 into develop Nov 28, 2024
23 checks passed
@thetutlage thetutlage deleted the fix/dml-issues branch November 28, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants