Get the queueable relationships for the entity.

@return array
777653
public function getQueueableRelations()
    {
        $relations = [];

        foreach ($this->getRelations() as $key => $relation) {
            if (method_exists($this, $key)) {
                $relations[] = $key;
            }

            if ($relation instanceof QueueableCollection) {
                foreach ($relation->getQueueableRelations() as $collectionValue) {
                    $relations[] = $key.'.'.$collectionValue;
                }
            }

            if ($relation instanceof QueueableEntity) {
                foreach ($relation->getQueueableRelations() as $entityKey => $entityValue) {
                    $relations[] = $key.'.'.$entityValue;
                }
            }
        }

        return array_unique($relations);
    }
168224
public function getPropertyRelationMap(): array
    {
        $relations = [];

        foreach ($this->getRelationMappings() as $mapping) {
            $accessor = $mapping->getAccessor();

            if ($accessor instanceof PropertyAccessor) {
                $relations[$accessor->getPropertyName()] = $mapping->getRelation();
            }
        }

        return $relations;
    }
972251
public function getDescription()
    {
        if (!$this->queue) {
            return [
                'queue' => 'not set',
            ];
        }
        
        $connection = $this->queue->getConnection();
        
        return [
            'queue'     => $this->queue->getName(),
            'host'      => $connection->getHost(),
            'port'      => $connection->getPort(),
            'connected' => $connection->isConnected(),
            'class'     => __CLASS__,
        ];
    }
639427
protected function eagerLoadRelations()
    {
        $query = $this->model;

        if (is_array($this->eagerLoadRelations)) {
            $eagerLoads = [];

            foreach ($this->eagerLoadRelations as $relation => $rules) {
                // case for relations[]=relation_name
                // with relation that is numeric
                $relation = (is_integer($relation)) ? $rules : $relation;

                // case for relations[relation_name][attributes][]=attrib_name
                // with relation that is a relation name
                if (is_array($rules) && array_key_exists('attributes', $rules)) {
                    $eagerLoads[$relation] = function ($q) use ($rules) {
                        // If query is instance of HasOneOrMany,
                        // make sure to select the parent key name as foreign key.
                        if (
                            $q instanceof HasOneOrMany &&
                            !in_array($fk = $q->getParent()->getForeignKey(), $rules['attributes'])
                        ) {
                            array_push($rules['attributes'], $fk);
                        }

                        $q->select($rules['attributes']);
                    };
                } else {
                    array_push($eagerLoads, $relation);
                }
            }

            return $query->with($eagerLoads);
        }

        return $query->with($this->eagerLoadRelations);
    }
360005
public function getListQueuedTask() {
		$result = [];
		if (!CakeSession::check($this->_sessionKey)) {
			return $result;
		}

		$tasks = CakeSession::read($this->_sessionKey);
		if (!is_array($tasks)) {
			return $result;
		}

		return $tasks;
	}
230014
public function getRelatedIds()
    {
        $fullKey = $this->relatedMap->getQualifiedKeyName();

        return $this->getQuery()->select($fullKey)->lists($this->relatedMap->getKeyName());
    }
807050
public function getRelations()
    {
        if (!isset($this->relationships)) {
            $this->relationships = array();
            // load them manually
            $mm = $this->getModelsManager();
            $relationships = $mm->getRelations(get_class($this));
            // Temporary fix because $mm->getRelations() doesn't support hasManyToMany relations right now.
            // get them separately and merge them
            $mtmRelationships = $mm->getHasManyToMany($this);

            $relationships = array_merge($relationships, $mtmRelationships);

            foreach ($relationships as $relation) {
                // todo load custom relationship
                $this->relationships[] = new Relation($relation, $mm);
            }
        }
        return $this->relationships;
    }
766609
protected function getRelationFields() {
        $fields = [];
        foreach ($this->relations as $relation) {
            $fields = array_merge($fields, $relation->getLinkKeys());
        }
        return array_unique($fields);
    }
113044
public function getRelationshipAllowableValues()
    {
        return [
            self::RELATIONSHIP_PARENT,
            self::RELATIONSHIP_GRANDPARENT,
            self::RELATIONSHIP_SELF,
            self::RELATIONSHIP_AUNTUNCLE,
            self::RELATIONSHIP_SIBLING,
            self::RELATIONSHIP_OTHER,
            self::RELATIONSHIP_EMPTY,
        ];
    }
107711
public function getRequiredRelationProperties(): array
    {
        if (null !== $this->requiredRelationProperties) {
            return $this->requiredRelationProperties;
        }
        $traits = $this->reflectionClass->getTraits();
        $return = [];
        foreach ($traits as $traitName => $traitReflection) {
            if (false === \ts\stringContains($traitName, '\\HasRequired')) {
                continue;
            }
            if (false === \ts\stringContains($traitName, '\\Entity\\Relations\\')) {
                continue;
            }

            $property          = $traitReflection->getProperties()[0]->getName();
            $return[$property] = $this->getTypesFromVarComment(
                $property,
                $this->getReflectionHelper()->getTraitProvidingProperty($traitReflection, $property)
            );
        }
        $this->requiredRelationProperties = $return;

        return $return;
    }
299519
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\BelongsToAttribute::make('target_id')
                ->setRelationName('target')
                ->setRelationManager(TargetManager::class)
                ->setRequired(true),
            Attributes\EnumAttribute::make('targetable_type', app('amethyst')->getMorphListable('targetable', 'targetable'))
                ->setRequired(true),
            Attributes\MorphToAttribute::make('targetable_id')
                ->setRelationKey('targetable_type')
                ->setRelationName('targetable')
                ->setRelations(app('amethyst')->getMorphRelationable('targetable', 'targetable'))
                ->setRequired(true),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
87752
protected function getQueues() {
        if (!$this->_queues) {
            $this->_queues = new QueueList($this->version, $this->solution['sid']);
        }

        return $this->_queues;
    }
593365
private function buildRelationshipGetters() {
        $buffer = '';
        foreach($this->getRelationships() as $relationship) {
            $field = $this->getField($relationship->getLocalColumn());
            if($relationship->isPlural()) {
                $method = new Object\Method();
                $method->setAccess('public');
                $method->setDescription('Gets the related ' . $relationship->getAlias());
                $method->setName('get' . ucfirst($relationship->getAlias()));
                $method->setReturnType('ResultSet|Child' . $relationship->getRemoteShortModel() . '[]');
                $parameter = new Object\Parameter();
                $parameter->setDescription('');
                $parameter->setName('parameters');
                $parameter->setDefaultValue('null');
                $parameter->setType('array');
                $method->addParameter($parameter);
                $method->setContent('return $this->getRelated(\'' . $relationship->getAlias() . '\', $parameters);');
                $this->getAbstractClass()->addMethod($method);

                $method = new Object\Method();
                $method->setAccess('public');
                $method->setDescription('Gets the count of related ' . $relationship->getAlias());
                $method->setName('count' . ucfirst($relationship->getAlias()));
                $method->setReturnType('int');
                $parameter = new Object\Parameter();
                $parameter->setDescription('');
                $parameter->setName('parameters');
                $parameter->setDefaultValue('null');
                $parameter->setType('array');
                $method->addParameter($parameter);
                $method->setContent('return $this->get' . ucfirst($relationship->getAlias()) . '($parameters)->count();');
                $this->getAbstractClass()->addMethod($method);
            } else {

                $method = new Object\Method();
                $method->setAccess('public');
                $method->setDescription('Gets the related ' . $relationship->getAlias());
                $method->setName('get' . ucfirst($relationship->getAlias()));
                if($this->getAbstractClass()->hasMethod($method->getName())) {
                    $method->setName('getRelated' . ucfirst($relationship->getAlias()));
                }
                $method->setReturnType('Child' . $relationship->getRemoteShortModel() . '|false');
                $method->setContent('return $this->getRelated(\'' . $relationship->getAlias() . '\');');
                $this->getAbstractClass()->addMethod($method);

                if($field->isNullable()) {
                    $method = new Object\Method();
                    $method->setAccess('public');
                    $method->setDescription('Checks if a relationship exists');
                    $method->setName('has' . ucfirst($relationship->getAlias()));
                    $method->setReturnType('bool');
                    $method->setContent('return !is_null($this->get' . ucfirst($relationship->getAlias()) . '());');
                    $this->getAbstractClass()->addMethod($method);
                }
            }
        }
        return $buffer;
    }
378366
protected function buildRelationships()
    {
        if (isset($this->relationships)) {
            return $this->relationships;
        }

        $paths = Util::parseRelationshipPaths($this->includes);

        $relationships = [];

        foreach ($paths as $name => $nested) {
            $relationship = $this->serializer->getRelationship($this->data, $name);

            if ($relationship) {
                $relationshipData = $relationship->getData();
                if ($relationshipData instanceof ElementInterface) {
                    $relationshipData->with($nested)->fields($this->fields);
                }

                $relationships[$name] = $relationship;
            }
        }

        return $this->relationships = $relationships;
    }
326319
public function getQueueableId()
    {
        if (isset($this->attributes[$this->getKeyName()])) {
            return $this->getKey();
        }

        return sprintf(
            '%s:%s:%s:%s:%s:%s',
            $this->foreignKey, $this->getAttribute($this->foreignKey),
            $this->relatedKey, $this->getAttribute($this->relatedKey),
            $this->morphType, $this->morphClass
        );
    }
274805
public function getRelations()
    {
        $relations = $columns = [];

        /** @var Field $field */
        foreach ($this->builder->fields() as $field) {
            $columns[] = $field->column();
        }

        foreach (Arr::flatten($columns) as $column) {
            if (Str::contains($column, '.')) {
                list($relation) = explode('.', $column);

                if (method_exists($this->model, $relation) &&
                    $this->model->$relation() instanceof Relations\Relation
                ) {
                    $relations[] = $relation;
                }
            } elseif (method_exists($this->model, $column) &&
                !method_exists(Model::class, $column)
            ) {
                $relations[] = $column;
            }
        }

        return array_unique($relations);
    }
279740
public function getRawAttributes(): array
    {
        $attributes = $this->wrappedEntity->getEntityAttributes();

        foreach ($this->entityMap->getNonEmbeddedRelationships() as $relation) {
            unset($attributes[$relation]);
        }

        if ($this->entityMap->getInheritanceType() == 'single_table') {
            $attributes = $this->addDiscriminatorColumn($attributes);
        }

        $attributes = $this->entityMap->getColumnNamesFromAttributes($attributes);

        $attributes = $this->flattenEmbeddables($attributes);

        $foreignKeys = $this->getForeignKeyAttributes();

        return $this->mergeForeignKeysWithAttributes($foreignKeys, $attributes);
    }