Help on Query spec for subfolder
Version: Windchill 11.2
Use Case: I would like to perform windchill query spec for the following statement
SELECT NAME FROM SUBFOLDER WHERE ida3containerreference=80556;
below is my code:
public class qeurytest { public static void showFolder() throws WTException {
QuerySpec qs=new QuerySpec();
qs.setAdvancedQueryEnabled(true);
int foldertable=qs.appendClassList(wt.folder.SubFolder.class, false); ClassAttribute ca1 = new
ClassAttribute(SubFolder.class,SubFolder.NAME);
qs.appendSelect(ca1, new int[] {foldertable}, true);
SearchCondition sc= new SearchCondition(SubFolder.class,SubFolder.CONTAINER_ID,SearchCondition.EQUAL,"80556");
qs.appendWhere(sc,new int[] {foldertable});
System.out.println("Printing the queryspec of class --> " + qs); }
Description:
I am facing an error : Attribute "containerReference.key.id" of class "java.lang.Long" is not of type "java.lang.String"
why is this error coming up and what would be the windchill queryspec for the statement.
Thank you

