Closed mkrecek234 closed 2 years ago
interesting finding, strictly taken it is a bug, as model modelled with max. 1 record cannot contain more than one record :)
I belive the $customermodel->addCondition(...)
in the repro code is not even needed (and technically the setOrder
neither, although any matching record will be picked)
Steps to reproduce:
I get this error:
Atk4\Data\Exception: Ambiguous conditions, more than one record can be loaded
Code snippet:What should be expected: If there was minimum one entity matching the conditions, $entity should contain that (first) one, otherwise $entity == null.