<?php
namespace Tenet\Filter;

use Tenet\FilterInterface;
use Tenet\Accessor;

class AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface
{
	public function convertToSetterValue(Accessor $accessor, $object, $field, $value)
	{
		$metadata = $accessor->getObjectManager()->getClassMetadata(get_class($object));
		$target   = $metadata->getAssociationTargetClass($object);

		return $this->makeObject($accessor, $object, $target, $value);
	}

	public function convertToGetterValue(Accessor $accessor, $object, $field, $value)
	{
		return $value;
	}
}


<?php
namespace Tenet\Filter;

use Tenet\FilterInterface;
use Tenet\Accessor;

class AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface
{
	public function convertToSetterValue(Accessor $accessor, $object, $field, $value)
	{
		$metadata = $accessor->getObjectManager()->getClassMetadata(get_class($object));
		$target   = $metadata->getAssociationTargetClass($field);

		return $this->makeObject($accessor, $object, $target, $value);
	}

	public function convertToGetterValue(Accessor $accessor, $object, $field, $value)
	{
		return $value;
	}
}


Fix bug getting associated entity (target name)
Fix bug getting associated entity (target name)

For some reason this was not using the field name to determine the
associated entity, but the object, which was throwing error converting
to string.