$manager = $this->modelsManager;
$query = $this->modelsManager->createQuery("update cus_detail set device_mac = '$UsrMac' where uname = '$UserName'");
$test = $query->execute();
The update query not working. Instead of updating a row, the above query inserting new row every time.