On a physics course it was stated that $$ \nabla\cdot\vec{D}=\rho_f=\nabla\cdot(\varepsilon_0\vec{E}) $$ and then it follows that $$ \vec{D}=\varepsilon_0\vec{E} $$ I know this is not generally true, but was wondering if there were some conditions for it to be so.
EDIT: It turned out I was missing some details on the argument, and the latter isn't a true implication. I'm still interested in the title's question though, and would like to hear about it.
What really follows is that the vector field $\vec{D} - \varepsilon_0 \vec{E}$ is solenoidal, i.e. its divergence is $0$. For example, the magnetic field $\vec{B}$ always has this property.