findBy(['user' => $user], ['createdAt' => 'DESC'], $limit, $offset); } public function countByUser(User $user): int { return $this->count(['user' => $user]); } public function save(WalletTransaction $entity, bool $flush = true): void { $this->getEntityManager()->persist($entity); if ($flush) $this->getEntityManager()->flush(); } }