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(core): Handle nullable relations in EntityHydrator #2683

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

jnugh
Copy link
Contributor

@jnugh jnugh commented Feb 20, 2024

Fixes #2682

Description

I already described the issue in #2682. The EntityHydrator crashes if a nested relation should be hydrated but the parent is nullable.

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

netlify bot commented Feb 20, 2024

Deploy Preview for effervescent-donut-4977b2 canceled.

Name Link
🔨 Latest commit 1353506
🔍 Latest deploy log https://app.netlify.com/sites/effervescent-donut-4977b2/deploys/65d48075557a55000886d5c4

@michaelbromley
Copy link
Member

Thanks for the report and PR!

Looks like a slight adjustment is needed to the e2e test for mysql/mariaDB though.

@jnugh jnugh force-pushed the entity-hydrator-null branch from 8835ca9 to 1353506 Compare February 20, 2024 10:35
@jnugh
Copy link
Contributor Author

jnugh commented Feb 20, 2024

Right, I created the sub relation with onDelete: 'SET NULL', but did not make the column nullable. Let's see if this the new commit goes trough :)

@michaelbromley michaelbromley merged commit 4e1f408 into vendure-ecommerce:master Feb 20, 2024
18 checks 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.

EntityHydrator crashes if a parent relation is null
2 participants