When you dream about your ex, it means that your subconsciousness tries to warn you through your dream.
You could be searching for someone who has a similar personality as your previous partner, but who wasn’t the right person for you. That means that you could be with someone who will repeats mistakes of your ex.
For example, if you tend to fall in love easily in handsome men or women, you will probably be deceived, because they are selfish and vain. You have to look for someone who respects you more, not to cheat on you, like your ex did.
If you dream about your ex you were with a long time ago, this happens because your subconsciousness reminds you of unfortunate events from your previous relationship. Your dream warns you that if you chose to be with someone who looks like your ex, you wouldn't make yourself happy.
But, if you broke up recently, it is possible that you still love your ex, despite being mad at him/her. In that case, you dreamed about him/her, because your subconsciousness shows you that you haven’t overcome your feelings about the break-up yet.
You could have dreams about your old partner if you left him/her because you were attracted to someone who only made you suffer. In this case, your subconsciousness sends you messages that your ex was the right one for you, not the man or the woman who attracts you currently. This attraction will disappear when you realize who they really are.
You should learn how to interpret your dreams based on the scientific method of dream interpretation in order to find out what exactly is your case, and then you have to follow the instructions of sub consciousness with precision.
Your subconscious mind will help you to find your happiness beside the right partner, instead of repeating mistakes from the past, or instead of losing your perfect lover because you were superficial in searching for the right partner and your efforts were in vain.