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
Describe the bug
Let's say we have three entities (ProductVariant, MetaEntity, Configuration). MetaEntity is a nullable customField of ProductVariant and Configuration is related to MetaEntity.
If I use the EntityHydrator to fetch Configuration I get an error in getRelationEntityAtPath at
consttarget=parent[part];
because ProductVariant.customFields.metaEntity was null parent['configuration'] is not accessible.
If I understand correctly it would be okay to just return null here as nothing needs to be translated or calculated.
To Reproduce
Define a nullable custom field relation which contains another relation. Hydrate the nested relation while the first one is null.
Expected behavior
It should return null for the top level relation.
Environment (please complete the following information):
@vendure/core version: latest (master)
Nodejs version: 20
Database (mysql/postgres etc): postgres / sqlite
Additional context
I already implemented a fix for this, will create a PR as well.
The text was updated successfully, but these errors were encountered:
Describe the bug
Let's say we have three entities (ProductVariant, MetaEntity, Configuration). MetaEntity is a nullable
customField
ofProductVariant
andConfiguration
is related toMetaEntity
.If I use the
EntityHydrator
to fetchConfiguration
I get an error ingetRelationEntityAtPath
atbecause
ProductVariant.customFields.metaEntity
was nullparent['configuration']
is not accessible.If I understand correctly it would be okay to just return null here as nothing needs to be translated or calculated.
To Reproduce
Define a nullable custom field relation which contains another relation. Hydrate the nested relation while the first one is null.
Expected behavior
It should return null for the top level relation.
Environment (please complete the following information):
Additional context
I already implemented a fix for this, will create a PR as well.
The text was updated successfully, but these errors were encountered: