That works for some people, for others it is much harder. It is very dependent on individual situation.
One thing it depends on is the acidity of your saliva (and your overall diet.) Commonly eating acidic foods (like toast) will cause your osteoclasts (opposite of osteoblasts) to take calcium out of your bones to adjust your blood pH, which cannot be off even the tiniest bit or you will immediately die. (Your teeth, unfortunately are a bone.) So keeping your diet alkaline overall will cause your osteoblasts to add calcium back into the hole in your tooth, which is what you want.
(This is why old women in America get osteoporosis despite the silly inorganic calcium pills that their doctors have them take.)
Keeping your mouth clean is important - you do not want sugar sitting around for hours in between your teeth, because this causes saliva acidity, not to mention bacteria that feed on sugar and harm your teeth.
Oil-pulling might be something to consider.
Finally, some recommend (in addition to oils) an infusion or tea of comfrey root (raw or dry) swished in the mouth for 15-20 minutes daily. This allowed me to heal a soft spot on one of my incisors rather quickly, but is taking a bit longer for a fully developed cavity.
(Comfrey root is not to be swallowed; regular ingestion can result in liver cancer.)