exception - Doctrine, Zend, Entity QueryException has no field or association named -
i'm having orderentity. first time needed 3 properties table. need 2 more. i'm adding 2 properties entity:
namespace stock\entity; use doctrine\orm\mapping orm; /** * @orm\entity * @orm\table(name="orders") */ class orderentity { /** * @orm\id * @orm\column(type="integer", name="orders_id") */ private $ordersid; /** * @orm\column(type="string", name="order_number") */ private $ordernumber; /** * @orm\column(type="integer", name="stores_id") */ private $storesid; /** * @orm\column(type="string", length=3, name="currency") */ private $currency; /** * @orm\column(type="decimal", precision=6, scale=14, name="currency_value") */ private $currencyvalue; public function getordersid() { return $this->ordersid; } public function setordersid($ordersid) { $this->ordersid = $ordersid; } public function getordernumber() { return $this->ordernumber; } public function setordernumber($ordernumber) { $this->ordernumber = $ordernumber; } public function getstoresid() { return $this->storesid; } public function setstoresid($storesid) { $this->storesid = $storesid; } public function getcurrency() { return $this->currency; } public function getcurrencyvalue() { return $this->currencyvalue; } public function setcurrency($currency) { $this->currency = $currency; return $this; } public function setcurrencyvalue($currencyvalue) { $this->currencyvalue = $currencyvalue; return $this; }
the new properties currency , currencyvalue.
$query = $this->getem()->createquery( "select o.ordersid, o.currency " . "stock\entity\orderentity o " . "o.ordersid ='".$orderid."'" );
if want create query using newer properties got queryexception:
[semantical error] line 0, col 21 near 'currency from': error: class stock\entity\orderentity has no field or association named currency
i don't understand problem is!
Comments
Post a Comment