public function from($type, $alias = null)
{
$type = $this->getSchemaFromType($type);
if (is_null($type->getFilter())) {
throw new InvalidArgumentException(sprintf('The schema type "%s" needs a filter defined to query LDAP with it.', $type->getObjectType()));
}
$this->operation->getFilter()->addLdapObjectSchema($type, $alias);
$this->hydrator->setLdapObjectSchema($type);
return $this;
}