The important thing is to learn from the mistakes we did in the past relationships and correct ourselves. A male child growing in life seeing his father physically abusing his mother can have two approaches in his own life. One is that beating wife is okay and normal and there is nothing wrong in resorting to it. That is what you may call making a template. Another approach could be that he feels what his father did was outright wrong and he decides to treat his wife with honor and love when he grows up to become a man. The second is a new recourse and it is not a template.
Same thing applies to marital relationships too. We may have a failed marriage and we may think that "I am OK, she/he is not OK" and hence carry an old template for the next marriage also. Or we can do introspection, realize what we did wrong in our previous relationship and take a recourse of not doing the same mistake in the new relationship.