Chop the onions carrots and celery finely, either in a food processor or by hand
Heat the oil in a large saucepan, add the chopped vegetable mixture and cook over low heat, starring frequently, for 5-7 minutes.
Add the chickpeas and cannelini beans, stir well to mix, then cook for 5 minutes. Stir in the tomatoe sauce and water. Coook, stirring for 2-3 minutes.
Add 2 cups of the stock one rosemary sprigs and salt and pepper to taste. Bring to boil, cover, then simmering gentely stirring occasionally for 1 hour.
Pour in the remaining broth, add pasta and bring to a boil, stirring. Lower the head and stirring frequently until the pasta is al dente (7-8 minutes).
Remove the rosemary sprig and serve in warm with fresh grated Parmesan or Ramano cheese and a few rosemary leaves