Open staabm opened 2 years ago
instead of
SELECT `adp`.*, `ada`.`spracheid` FROM `adp` INNER JOIN `ada` ON ada.adaid = adp.adaid WHERE (adpid = NULL) LIMIT 1
we should simulate
SELECT `adp`.*, `ada`.`spracheid` FROM `adp` INNER JOIN `ada` ON ada.adaid = adp.adaid WHERE adpid IS NULL LIMIT 1
for code like
$query = ' SELECT `adp`.*, `ada`.`spracheid` FROM `adp` INNER JOIN `ada` ON ada.adaid = adp.adaid WHERE (adpid = ?) LIMIT 1'; $adpMapper = new Application_Model_Mapper_Adp(); $adpModel = $adpMapper->fetchRowByStatement(new ClxProductNet_DbStatement($query, [$adpid]));
Related https://stackoverflow.com/a/10340795
The actual query simulation might be unnecessary.. but we could determine non-nullable types, when IS NULL is used in WHERE
This is partially completed by #596. We still need to support the WHERE x=NULL case.
WHERE x=NULL
instead of
we should simulate
for code like