Can genes/traits of a unborn baby change?

Patient: I have a question that I have been pondering about for the last few months. Is it possible to have the genes/traits of an unborn baby change after being pregnant for one month? In other words, say someone was already four weeks along and had unprotected sex with another male. Is it possible for this male’s genes to override the previous male’s genes

Doctor: No it is not possible once pregnancy has occurred. You need not worry about the child’s genetic makeup being altered by having sex with another person.