I started another thread on this a few weeks back and did a bit of research.
It seems that drugs that get into your bloodstream (alcohol, caffeine, prescription drugs etc.) can definitely have an effect on the baby via breastmilk, but the degree of the effect depends on the baby (currently I'm not risking alcohol or caffeine - I get little enough sleep with DD as it is!!) Chocolate can also be included in this category.
Certain proteins can make it through into your breastmilk, so yes, dairy (also soy, nuts, eggs etc.) can have an effect - again, depending on the baby. I suppose it's possible the proteins from beans may come through, but I don't know that for sure.
The fibre that causes wind in the adult gut from brassicas, legumes etc. DOES NOT get into breast milk, as far as I can see.
Certain flavours definitely come through - garlic, spices etc. - but they are more likely to have an effect on the taste of the milk rather than its nutritional properties.
Is your baby very gassy in the intestines (farty discomfort?)
The most likely explanation is that the higher volume of milk your LO is taking from you at this age - and therefore, lactose - is not being fully digested because the baby's immature digestive system is not yet making enough lactase to deal with it - hence some undigested milk makes it into the gut where it ferments and creates all that gas/bloating etc.
The exact same thing happened with my DD at around the same age, when her appetite and the amount of milk she was taking increased. It's very common - apparently happens in around 65% of babies. In time they grow out of it (my DD has been much better from about 10 weeks...), but in the meantime the advice is to limit the baby to one breast only for 3-4 hours before switching to the other one. The idea is that the baby takes in more low-volume high-cal cream (hind milk), giving their digestive system a chance to cope with it before the next high-volume splash (fore milk). I tried this with my DD and it seemed to make her wind issues more manageable.
The condition is called lactose overload - and the mother's intake of dairy products can contribute to it, apparently - but not necessarily.
HTH! Good luck...