In a large stockpot heat the oil over moderate heat until hot. Add the onion, celery and carrot and cook, stirring occasionally, for 5 minutes. Add ham and garlic and cook stirring for 1 minute. Add tomatoes, beans, beef stock, thyme, bay leaf and pepper to taste. Bring to a boil and simmer, covered, for 30 minutes.
Transfer 1/2 cup of the beans to a small processor or blender and puree. Return beans to pot and season with salt and pepper to taste. Bring liquid to a boil and add pasta. Simmer until pasta is tender, about 6 minutes.