public function set($virtualProperty, $relationEntity)
    {
        // Check for existing of the relation property
        if (! in_array($virtualProperty, $this->structure->relationProperties) || ! isset($this->structure->relations[$virtualProperty])) {
            throw new RelationException("Relation not defined!"); // @codeCoverageIgnore
        }

        // Make cache array if needed, for lazy loading
        if (! isset(self::$lazy[get_class($this->entity)][$virtualProperty])) {
            self::$lazy[get_class($this->entity)][$virtualProperty] = array();
        }

        /** @var Relation $relation */
        $relation = $this->structure->relations[$virtualProperty];
        if (! $relation instanceof Relation) {
            throw new RelationException("Relation indexing failed, something is really wrong, please report! Fetch proprty no instance of relation!"); // @codeCoverageIgnore
        }

        // Can only set OneToOne and ManyToOne
        if (! $relation instanceof OneToOne && ! $relation instanceof ManyToOne) {
            throw new RelationException("Only relations OneToOne and ManyToOne could be set!"); // @codeCoverageIgnore
        }

        // If NULL then set null into the entity id column (fk)
        if ($relationEntity === null) {
            // Set null
            $this->entity->{$relation->join->column} = null;
            return;
        }

        // Get target structure
        $targetStructure = EntityManager::getInstance()->getEntityStructure($relationEntity);

        // Check if relationEntity is saved, if not throw exception!
        if (! $relationEntity->_saved) {
            throw new RelationException("Save the relationship entity first!");
        }

        // Set the id in the from entity
        $id = $relationEntity->{$targetStructure->primaryColumn->propertyName};
        $this->entity->{$relation->join->column} = $id;

        // Set the cache
        self::$lazy[get_class($this->entity)] [$virtualProperty] [$id] = $relationEntity;
    }