Is it true that people with OCD should not have children?

When I was diagnosed, the doctor told me that it would be unwise for me to have children, because they will propably have OCD. It wouldn't be fair for me to make my children go through the same anxiety as me.