1:* filtering should use reference ID instead of referenced field
Currently when setting the 1:* reference field value the MySQL use referenced field instead of the ID field of the referenced module. Using the former is rather useless since that's effectively the ID field of the original module.
So change:
FROM `module`
LEFT JOIN `referenceModule` ON `module`.`nr`=`referenceModule`.`referenceField`
WHERE referenceModule `.`referenceField `="123"
To:
FROM `module`
LEFT JOIN `referenceModule` ON `module`.`nr`=`referenceModule`.`referenceField`
WHERE referenceModule `.`referenceID`="123"
Do note however that this means the validations will also need to apply to the ID field. In other words the type of the reference field and the reference may differ there it should validate against the field type of the reference ID field.
Additionally this issue may also apply to other storage engines!
Updates (2)
Issue type: Bug => Change
Workflow: Open => Closed
Fixed in changeset: 0 => 3834