private function createNode($entity)
    {
        //Get meta
        $meta = $this->getMeta($entity);

        //Get primary key
        $pk = $meta->getPrimaryKey();
        $id = $pk->getValue($entity);

        //Check if it already exists
        if($id)
        {
            $node = $this->client->getNode($id);
        }

        //Create it, it doesn't exist
        else
        {
            $node = $this->client->makeNode();
        }


        //Add all the properties
        foreach ($meta->getProperties() as $property)
        {
            $result = $property->getValue($entity);

            $node->setProperty($property->getName(), $result);
        }

        $currentDate = $this->getCurrentDate();

        //Add the creation date
        if(!$id)
        {
            $node->setProperty('creationDate', $currentDate);
        }

        //Add the update date
        $node->setProperty('updateDate', $currentDate);

        return $node;
    }