I'm currently a 3rd year at DMU, and I did buy a house here in Des Moines. All of my 3rd year rotations are in Des Moines, and most of the rotations that I have scheduled for 4th year are too. When you are setting up rotations, some students can can become "exempt" from their core hospital (4 months) and core clinic (2 months) matches. I was lucky to be exempt from them, which means that I was given a spot in Des Moines for those 6 months. The exemption is based on things such as family issues or daycare issues. But even if you are not "exempt", you still have a decent shot at getting your hospital and clinic in town. Most of your other rotations are easy to get in Des Moines, except the required OB/GYN and Peds. Those spots are kind of slim.
I'm happy that I bought a house when I came to school. My wife works full-time in Des Moines, so even if I had to leave Des Moines for rotations, she would have stayed here. We were both sick of apartment living after undergrad, so we decided to buy. I do know some of my classmates also have bought homes, most of them are also married. I'm just hoping everything will work out when we try to sell.