Both are true, to my knowledge (in the sense that Freud did believe this). They relate to the Oedipus and Electra complexes, which are are core parts of classical Freudian theory.
Children, through the Oedipus and Electra complexes during the phallic developmental stage, where they sexually desire their same-sex parent, eventually come to identify with their same-sex parent by resolving these desires through different mechanisms. These mechanisms are castration anxiety, in boys, and penis envy, in girls.
He believed that these mechanisms would lead to partner preferences matching the same-sex parent. Freud also believed that failing to successfully resolve the Oedipus or Electra complex could lead to a host of "problems" in adulthood, like neurosis, pedophilia and homosexuality.
I don't need to say that this classical view is outdated and not supported by evidence or modern theories.