Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
For $D$ a surface, there is work of Bogomolov. The results are weaker for higher dimensional varieties, but they do rule out genus $0$ and genus $1$ curves, cf. the work of G. Xu, Lawrence Ein, Claire Voisin and Gianluca Pacienza.