public function getRelationships($entity, $isPrimary, array $includeRelationships)
    {
        $relations = [];

        foreach ($this->_repository->associations() as $association) {
            $property = $association->getProperty();

            $data = $entity->get($property);
            if (!$data) {
                continue;
            }

            // change related  data in entity to dasherized if need be
            if ($this->_view->viewVars['_inflect'] === 'dasherize') {
                $dasherizedProperty = Inflector::dasherize($property);

                if (empty($entity->$dasherizedProperty)) {
                    $entity->$dasherizedProperty = $entity->$property;
                    unset($entity->$property);
                    $property = $dasherizedProperty;
                }
            }

            $relations[$property] = [
                self::DATA => $data,
                self::SHOW_SELF => true,
                self::SHOW_RELATED => false,
            ];
        }

        return $relations;
    }