diff --git a/src/Repository/TransactionPayeeRepository.php b/src/Repository/TransactionPayeeRepository.php new file mode 100644 index 0000000..b35320c --- /dev/null +++ b/src/Repository/TransactionPayeeRepository.php @@ -0,0 +1,23 @@ +selectFromDbById($id, TransactionPayee::class); + } + + public function getAllByTransaction(Transaction $transaction, bool $useRelations = false, array $withRelations = []): Generator + { + $select = new Select(Container::$dbConnection); + $select->where('transaction_id', '=', $transaction->getId()); + + yield from Container::$persistentDataManager->selectMultipleFromDb($select, TransactionPayee::class, $useRelations, $withRelations); + } +}