PrimaryKeyLoader doesn't properly process NULL
Opened this issue · 3 comments
dkarlovi commented
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;
}
dpfaffenbauer commented
PR?
dkarlovi commented
Yes, will do them all in one large effort, these are reminders for myself. :)
dpfaffenbauer commented
perfect, thanks a lot