1

Using the following code:

        QuerySpec qs = new QuerySpec(WTPart.class);
        qs.appendWhere(new SearchCondition(WTPart.class, WTPart.CREATOR_NAME, SearchCondition.EQUAL, name));

Got error

Attribute "creator.name" is not attribute of class "wt.part.WTPart"

I also want to know how to query part by modifier name

Thanks.

Tom
  • 2,857
  • 9
  • 46
  • 59

1 Answers1

1

If you want to query on modifier name

long userId=userName.getPersistInfo().getObjectIdentifier().getId();
QuerySpec qs = new QuerySpec(WTPart.class);
qs.appendWhere(new SearchCondition(WTPart.class,"iterationInfo.modifier.key.id",SearchCondition.EQUAL,userId), new int[] { 0, 1 });

I'm not sure about query on creator name, i'll check and update this

Vignesh Vino
  • 1,242
  • 4
  • 25
  • 50