How to deal with a parent that likes to put their beliefs on what happened to them onto you?
I can understand how frustrating this can be for you or for anyone. As people we never want to be compared to others because we are each unique individuals with our own thoughts, feelings, and ideas. We want to be able to be ourselves without worries of others trying to change us. We don't like to be compared to others because many times all the details of their situation is not the same as our individual situation. I think it is important to consider the parent's view point of why they may be doing this such as they are concerned about you as their child and just want what is best for you. They may feel they have special knowledge or experience that you do not have concerning an issue so they are giving you the advice because they don't want to watch you head down the same difficult roads maybe they did in the past. I would suggest being understanding of the whys behind the parent providing that information and being sensitive to their concern because you are their child and they care about you and your ability to have a good life.
I also would suggest that you assertively let them know that while you hear what they are saying and are listening to them that you are your own person and would like to experience the world and situations yourself so you can learn your own lessons from the choices that you make. Validating someones feelings can be extremely beneficial when attempting to have assertive communication that is open with each other. With that said it is important that you make efforts to make good healthy decisions in your life. If the decisions you are trying to make could have negative consequences for your wellbeing it is beneficial for you to reconsider your options.
Healthy decision making comes in many ways. Doing our own research, sometimes life experience, and other times asking people that have already experienced the situation and would have further knowledge about a situation. Don't discount the advice given if it could possibly benefit your life in a positive manner.
I hope this has helped. Good luck to you and best wishes.