/**
  * Constructor of the object type. This constructor MUST set the session property to the given session and
  * call the <code>self::populate</code> method with the given <code>$typeDefinition</code>
  *
  * @param SessionInterface $session
  * @param RelationshipTypeDefinitionInterface $typeDefinition
  * @throws CmisInvalidArgumentException Exception is thrown if invalid TypeDefinition is given
  */
 public function __construct(SessionInterface $session, TypeDefinitionInterface $typeDefinition)
 {
     if (!$typeDefinition instanceof RelationshipTypeDefinitionInterface) {
         throw new CmisInvalidArgumentException(sprintf('Type definition must be instance of RelationshipTypeDefinitionInterface but is "%s"', get_class($typeDefinition)));
     }
     $this->session = $session;
     parent::__construct($typeDefinition->getId());
     $this->populate($typeDefinition);
 }