I have written a custom task to fetch WTGroup objects belonging to a particular PDMLinkProduct. Following is the code that I have used:
QuerySpec qs = new QuerySpec(WTGroup.class); qs.appendWhere(new SearchCondition(WTGroup.class, "containerReference.key.classname", SearchCondition.EQUAL, product.getPersistInfo().getObjectIdentifier().getClassname().toString())); qs.appendAnd(); qs.appendWhere(new SearchCondition(WTGroup.class,"containerReference.key.id", SearchCondition.EQUAL, product.getPersistInfo().getObjectIdentifier().getId()), new int[] { 0 }); QueryResult qr = PersistenceHelper.manager.find(qs);
But I'm unable to return these fetched WTGroups in QueryResult using Return-Groups.
Does anyone know how to return these objects from the custom task?