Files
medusa-store/packages/core/utils
Adrien de Peretti ed11834d6e Fix(dml): DML default/nullable management (#10363)
RESOLVES FRMW-2813

**What**
Extract what we have done in the order module DML migration.
This includes all the changes we discussed around default value and nullable management

From now on, when the default is being set through the DML on a property, no default initializer will be created, this means that when a mikro orm class is being instantiated, no default will be applied at instantiation time. This fixes the issue when retrieving data and not selecting fields that have a default. The default initializer was taking the relay making you think the data was present except that it was the value of the default initializer. From now on, the default value is applied as follows
- db column default
- before flush
- on persist
The same applies for nullable properties/columns

Co-authored-by: Harminder Virk <1706381+thetutlage@users.noreply.github.com>
2024-11-29 11:46:26 +00:00
..
2024-11-27 15:40:07 +01:00
2024-11-27 15:40:07 +01:00