// Here I call Criteria filter
public function getWalletsActive() {
$criteria = Criteria::create()
->where(Criteria::expr()->eq("isRemoved", "0"))
->orderBy(array("currency.id" => "ASC"));
return $this->wallets->matching($criteria);
}
// Relation
/**
* @var Currency
*
* @ORM\ManyToOne(targetEntity="Currency")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="id_currency", referencedColumnName="id")
* })
*/
protected $currency;
// File BasicEntityPersister.php
// This cause the problem:
if ( ! isset($this->_class->fieldMappings[$fieldName])) {
throw ORMException::unrecognizedField($fieldName);
}
// There are no relations in $this->_class->fieldMappings at all!