Provided are pyrimidine-dioxothiazolidine/dioxooxazolidine derivative compounds of the general formula (I), wherein the variables are as defined in the specification. Examples of the compounds include (Z)-tert-Butyl 4-((6-(4-((2,4-dioxothiazolidin-5-ylidene)methyl)phenoxy)-5-methylpyrimidin-4-yl)oxy)piperidine-1-carboxylate and (Z)-5-(3-((6-((1-(5-bromopyridin-2-yl)piperidin-4-yl)oxy)pyrimidin-4-yl)oxy)benzylidene)thiazolidine-2,4-dione. The compounds are GPR 119 agonists. The compounds may be useful in the treatment of obesity, diabetes and related metabolic disorders.