added API functions to save meta fields (#1063)
This commit is contained in:
@@ -28,6 +28,26 @@ use Pagerfanta\Pagerfanta;
|
||||
|
||||
class CustomerRepository extends EntityRepository
|
||||
{
|
||||
/**
|
||||
* @param mixed $id
|
||||
* @param null $lockMode
|
||||
* @param null $lockVersion
|
||||
* @return Customer|null
|
||||
*/
|
||||
public function find($id, $lockMode = null, $lockVersion = null)
|
||||
{
|
||||
/** @var Customer|null $customer */
|
||||
$customer = parent::find($id, $lockMode, $lockVersion);
|
||||
if (null === $customer) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$loader = new CustomerLoader($this->getEntityManager());
|
||||
$loader->loadResults([$customer]);
|
||||
|
||||
return $customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Customer $customer
|
||||
* @throws ORMException
|
||||
|
||||
Reference in New Issue
Block a user