Cook pasta per package directions and drain off half of the water. Saute onion and garlic in the oil. Add the parsley, salt, pepper, tomato sauce and bouillon cube and simmer for 5 minutes. Add the sauce and the beans to the pasta and water and simmer for another 5 minutes. Add the cheese and serve.