Hi Devs,
I have been successfully getting data like this until recently
but I'm now getting a warning that find and findOne are deprecated. I can see in this git issue it says to "use building instead".
I attempted the same thing with the example described in the Select Builder page in the doco, but am still getting the deprecation message on find():
I don't know if the Select Builder example above is what "use building instead" refers to. Can anyone please help me with how to do this?
Thanks,
Clare
I have been successfully getting data like this until recently
PHP Code:
$purchaseRepo = $this->entityManager->getRDBRepository('MmxPurchase');
$purchase = $purchaseRepo
->where(['name' => $orderNo])
->findOne();
I attempted the same thing with the example described in the Select Builder page in the doco, but am still getting the deprecation message on find():
PHP Code:
$selectBuilder = $this->selectBuilderFactory->create();
$query = $selectBuilder
->from('MmxPurchase')
->withStrictAccessControl() // applies ACL
// ->withSearchParams($searchParams) // search parameters passed from the frontend
->build();
$collection = $this->entityManager
->getRDBRepository('MmxPurchase')
->clone($query)
->find();
I don't know if the Select Builder example above is what "use building instead" refers to. Can anyone please help me with how to do this?
Thanks,
Clare

Comment