pimcore-data-definitions
pimcore-data-definitions copied to clipboard
PrimaryKeyLoader doesn't properly process NULL
trafficstars
| Q | A |
|---|---|
| Bug report? | yes |
| Feature request? | no |
| BC Break report? | no |
| RFC? | no |
| Branch? | master |
You have use cases where you need a composite primary key to actually contain NULL. This is currently not possible with the PrimaryKeyLoader.
The code might be something like
$value = $data[$map->getFromColumn()];
if ($value === null) {
$condition[] = '`'.$map->getToColumn().'` IS NULL';
} else {
$condition[] = '`'.$map->getToColumn().'` = ?';
$conditionValues[] = $value;
}
PR?
Yes, will do them all in one large effort, these are reminders for myself. :)
perfect, thanks a lot