src/Money/DataMapper/Mapper/Money/BudgetMapper.php
public function findAllByAccountId($accountId)
    {
        $this->addWhere('account_id', $accountId);
        $this->addOrder('budget_parent_id', 'ASC');
        $this->addOrder('budget_name', 'ASC');

        $budgets = array();
        foreach ($this->select() as $budget) {
            if ($budget->getParentId() === 0) {
                $budgets[$budget->getId()] = $budget;
            } else {
                $budgets[$budget->getParentId()]->addChild($budget);
            }
        }

        return $budgets;
    }
public function findAllByAccountId($accountId)
    {
        $this->addWhere('account_id', $accountId);
        $this->addOrder('budget_parent_id', 'ASC');
        $this->addOrder('budget_name', 'ASC');

        $budgets = array();
        foreach ($this->select() as $budget) {
            if ($budget->getParentId() === 0) {
                $budgets[$budget->getId()] = $budget;
            } else {
                $budgets[$budget->getParentId()]->addChild($budget);
            }
        }

        return $budgets;
    }
Get budgets by account id.

@param  int $accountId
@return Budget[]