public function getAllWhichHasOne($foreignId, JSONSimpleStorage $object, $cascade = false) {
        // default value
        $result = [];
        
        // check if foreign object has relations with current one
        if (isset($object->many[$foreignId][$this->class])) {
            // iterate through all related data
            foreach ($object->many[$foreignId][$this->class] as $id) {
                if (null !== ($item = $this->getById($id, $cascade))) {
                    $result[$id] = $item;
                }
            }
        }
        return $result;
    }