A nasty bug I've found:
That works okay:
$comps = \space\companies\EntityCompany::find( ['limit' => 5] );
echo '<pre>';
$comps->next(); print_r( $comps->current()->toArray() ); echo '<br />';
$comps->next(); print_r( $comps->current()->toArray() ); echo '<br />';
$comps->next(); print_r( $comps->current()->toArray() ); echo '<br />';
$comps->next(); print_r( $comps->current()->toArray() ); echo '<br />';
$comps->next(); print_r( $comps->current()->toArray() ); echo '<br />';
Now WHY it doesn't working ($comps->current() is returning NULL)???
$comps = \space\companies\EntityCompany::find( ['limit' => 1] );
echo '<pre>';
$comps->next(); print_r( $comps->current()->toArray() ); echo '<br />';
That is working OK:
$comps = \space\companies\EntityCompany::find( ['limit' => 1] );
echo '<pre>';
foreach ($comps as $entity) {
print_r( $entity->toArray() );
}