Hi! I qant to query object through windchill api like this:
QuerySpec qs = new QuerySpec(WTDocument.class);
qs.setAdvancedQueryEnabled(true);
int ind = qs.appendClassList(WTDocument.class,true);
SearchCondition sc = new SearchCondition(WTDocument.class, WTDocument.NUMBER, SearchCondition.LIKE, "173.157.%");
SearchCondition sc2 = new SearchCondition(WTDocument.class, WTDocument.FOLDERING_INFO, SearchCondition.LIKE, "folderName");
qs.appendWhere(sc, new int[ind]);
qs.appendAnd();
qs.appendWhere(sc2, new int[ind]);
QueryResult qr = PersistenceHelper.manager.find(qs);
while (qr.hasMoreElements())
{
WTDocument doc = (WTDocument)qr.nextElement();
System.out.println(doc.getNumber());
}
But I have an exception that attribute "folderingInfo" is not the member of the wt.doc.WTDocument class.
Whats wrong? How can I create the complex query with a lot of searchConditions?