public function publicValue(): array
    {
        $public = parent::publicValue();

        array_walk_recursive($public, function (&$value) {
            if ($value instanceof ObjectID) {
                $value = (string)$value;
            }
        });

        return $public;
    }
public function publicValue(): array
    {
        $public = parent::publicValue();

        array_walk_recursive($public, function (&$value) {
            if ($value instanceof ObjectID) {
                $value = (string)$value;
            }
        });

        return $public;
    }
public function publicValue ( ) : array { $ public = parent :: publicValue ( ) ; array_walk_recursive ( $ public , function ( & $ value ) { if ( $ value instanceof ObjectID ) { $ value = ( string ) $ value ; } } ) ; return $ public ; }
Since most of ODM documents might contain ObjectIDs and other fields we will try to normalize
them into string values.

@return array
Since most of ODM documents might contain ObjectIDs and other fields we will try to normalize them into string values .