I have an XML datasource auto generated from the Smartclient datasource generator.
I then wrote a small piece of code to try and run a simple query but it is either because I am using an evaluation copy or it simply is broken as reflected in many of the posts I have found that are along similar lines.
This small piece of code:
... it does the same thing.
What am I missing?
I then wrote a small piece of code to try and run a simple query but it is either because I am using an evaluation copy or it simply is broken as reflected in many of the posts I have found that are along similar lines.
This small piece of code:
DSRequest i18nDs = new DSRequest("i18nDs", "fetch");
try {
i18nDs.addToCriteria(new SimpleCriterion("LANG_", DefaultOperators.Equals, lang));
i18nDs.addToCriteria(new SimpleCriterion("CNTRY_", DefaultOperators.Equals, country));
i18nDs.addToCriteria(new SimpleCriterion("VRNT_", DefaultOperators.Equals, variant));
DSResponse dr = i18nDs.execute();
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
return null;
}
The resulting query has this in the WHERE clause:try {
i18nDs.addToCriteria(new SimpleCriterion("LANG_", DefaultOperators.Equals, lang));
i18nDs.addToCriteria(new SimpleCriterion("CNTRY_", DefaultOperators.Equals, country));
i18nDs.addToCriteria(new SimpleCriterion("VRNT_", DefaultOperators.Equals, variant));
DSResponse dr = i18nDs.execute();
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
return null;
}
SELECT .... FROM .... WHERE '1' = '1' AND '1' = '1' and '1' = '1'
Even if I use the more simple : 18nDs.addToCriteria("LANG_", lang);... it does the same thing.
What am I missing?
Comment