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
When i define a defaultValue for a custom field of type string on the Product entity, it always ends up being null in the database. For type int it always ends up being 0, despite of what i set in the config, e.g. 101.
To Reproduce
Steps to reproduce the behavior:
Add custom field (type "string", with a desired defaultValue) in the vendure config, for entity Product
Apply migrations
Navigate to "Product"
Fill out required fields, already note that there is no value visible in the newly added custom field.
Click "Create"
In the network tab, the value for the custom field is null
If you check the database, the value is null as well.
Expected behavior
Default values behave as intended.
Environment (please complete the following information):
Describe the bug
When i define a
defaultValue
for a custom field of typestring
on the Product entity, it always ends up beingnull
in the database. For typeint
it always ends up being 0, despite of what i set in the config, e.g.101
.To Reproduce
Steps to reproduce the behavior:
defaultValue
) in the vendure config, for entity Productnull
null
as well.Expected behavior
Default values behave as intended.
Environment (please complete the following information):
Additional context
Reproduction: https://github.com/KilianSSL/vendure-custom-field-default-value
The text was updated successfully, but these errors were encountered: