Have you read
The Drama of the Gifted Child by Alice Miller? That's a popular classic about children with traumatic upbringing and its effects (does not have much to do with being "gifted" actually).
On transference specifically, tons to browse in the psychoanalytic literature. I have two major such patterns that go back to childhood: avoiding female authority figures (I never even had many close women friends) and being drawn to males for the same. It's related to how I was never close to my mom and girls in my childhood and how I had good, mutually enriching and meaningful experiences with my dad and older males. It's been a very interesting process in my 30's work through this in depth and try to do it differently. I am more balanced now but the old pattern is still strong. I personally don't mind much as it does not involve being attracted to abusive people, I actually avoid that also like the plague