If using dried beans, add soaked beans to a saucepot with the onion, bay leaf and some salt. Add enough water to cover by a few inches and bring to a boil. Reduce heat and simmer for about an hour, until the beans are tender. Discard onions and bay, and drain.
Preheat oven to 400°F.
In a skillet, cover sausages with stock and bring to boil. Reduce heat to a simmer and cook sausages through, reducing stock by half.
Meanwhile, heat a large, deep skillet or Dutch oven over medium-high heat with EVOO. Add butter and onions, celery, garlic, oregano and 2 tablespoons of rosemary. Cook to soften onions and celery, 7-8 minutes. Add tomato paste and stir another minute; add wine and let it reduce and almost evaporate into vegetables. Add tomatoes, passata or purée, the beans and stock from sausages. Reduce heat to a simmer.
Crisp sausage casings in a drizzle of oil in the pan you cooked them in (you will have poured the stock into the vegetables). Cut sausages on bias.
Transfer beans and sauce to an oiled or buttered casserole then stir in or nest sausages. Top casserole with cheese and remaining tablespoon rosemary. Bake to brown and bubbly, about 15 minutes. Serve with warm bread for mopping.