I want to search for records which match on two fields with two supplied objects, for example
$cnt = $this->usedCouponRepository->findByUser($validvip)->toArray() ;
$cnt2 = $this->usedCouponRepository->findByCoupon($validcoupon)->toArray() ;
get interesection, (find how many times validvip pairs up with validcoupon in the usedcoupon table) a call like this would be it -
$cnt3 = $this->usedCouponRepository->findByUserAndCoupon($validcoupon,$validuser);
is there a magic function to do this or some other efficient way? I'd hate to just loop over the first looking for a match in code. Thanks