You married your spouse for richer and poorer, in sickness and in health, but what about obesity and overweight?

Your risk of becoming obese has more to do with the lifestyle you lead with your significant other than the way you were brought up by your parents.

It doesn't matter if you were raised in a household where you only had desserts on weekends and there were fresh vegetables at every meal; by mid-life that influence has faded, and the diet and exercise choices you and your partner make every day have a greater impact on your weight than the habits your parents drilled into you at home, according to a new study.

Another piece of the puzzle as researchers expand their understanding of the relationships among obesity, genetics, and lifestyle.

Researchers analyzed data from 20,000 Scottish families and compared family genetics and home environments in childhood and adulthood. Then they scored these traits scored against measures of health and obesity — including blood pressure, total body fat, body mass index and waist to hip ratio — among the people in the study.

It turns out the lifestyle a couple leads together has much more influence on their weight and risk of developing obesity than their upbringing.

“Although genetics accounts for a significant proportion of the variation between people, our study has shown that the environment you share with your partner in adulthood also influences whether you become obese and this is more important than your upbringing,” researcher Chris Haley, of the University of Edinburgh, said in a statement. “The findings also show that even people who come from families with a history of obesity can reduce their risk by changing their lifestyle habits.”

This is another piece of the puzzle as researchers continue to expand their understanding of the relationships among obesity, genetics and lifestyle. The diet and exercise choices you make as an adult can significantly impact the battle of the bulge, regardless of genetics.

There are several things you can do to prevent obesity. First, eat a diet rich in plant foods with moderate amounts of lean meats. Limit how often you eat sweets and fried foods, as well as creamy, cheesy sauces. Avoid processed foods, be smart when you eat out, and learn to cook healthy meals — cooking classes can be a good way for you and your significant other to change your eating habits.

You also might join a gym or a running group with your partner; take daily walks, kayak, swim laps, take dance lessons, or do yoga or Pilates. Just choose physical activities you both enjoy —whether together or separately — and do them regularly. The combination of an active lifestyle and good nutrition with a another person who values the same choices is a good hedge against obesity and the chronic diseases that it causes. It's even more important to your adult health than your mom’s most passionate pleas to eat your veggies.

The study is published in the journal PLOS Genetics.