コントローラーで getName() にアクセスしようとしていますが、機能していません。
これは機能しません:
$supplier = $em->getRepository('WICSupplierBundle:Supplier')->findBy(array('account'=>$account_id, 'id'=>$id));
$supplierName = $supplier->getName();
This doesnt return the name from the db....
I get the error: "Error: Call to a member function getName() on a non-object..."
これは機能します:
$supplier = $em->getRepository('WICSupplierBundle:Supplier')->find($id);
$supplierName = $supplier->getName();
This returns the name from the db....
なんで?