Here are some tricks for cooking beans that hounds say will minimize unpleasant intestinal effects.
Put beans in rapidly boiling water and let them boil for two minutes; take off heat and let them sit for an hour. Discard the water and continue cooking with fresh water (rworange).
Add a tablespoon of baking powder to your pot of beans and water; bring to a boil; rinse, cover with fresh water and simmer (*Candy).
Add a strip of kombu (a thick seaweed sold at Japanese markets) to the cooking liquid (it leaves no discernible flavor).
Add a tiny pinch of the Indian spice asafoetida (“heeng” in Hindi), a pungent tree resin in powdered form (careful–a little goes a long way!). It aids in digestion.
Board Links: How to “de-gas” beans?