After investigation; it would seem that either your table is missing an id
column or your id
column does not contain unique values or you have configured Idiorm to use an invalid column instead of id
.
Idiorm loops over the rows returned and assigns them to an array, using the id
value as the index/key. If there is no id
value then only the last result is returned. If you have an id
column that contains duplicate values, then you will get fewer results than you should as the duplicates will overwrite previous keys in the array.
You can see more over on the github bug, along with proposed changes.