Skip to main content
16-Pearl
May 4, 2025
Question

Significance of new int[]{0} in Query Spec

  • May 4, 2025
  • 1 reply
  • 355 views

What is the significance of new int[]{0} in appendWhere of

querySpec.appendWhere(
new SearchCondition(EPMDocument.class, "master>number", SearchCondition.EQUAL, number, true),
new int[] { 0 });

1 reply

avillanueva
23-Emerald I
23-Emerald I
May 5, 2025

See snippet below. When you have multiple classes in the query (similar to From declaration), it needs to index the classes. That same index is used to tie into where clauses. 

 

QuerySpec spec=new QuerySpec();
int wtPart=spec.addClassList(WTPartMaster.class,true);
SearchCondition sc=new SearchCondition(WTPartMaster.class,WTPartMaster.NUMBER,SearchCondition.EQUAL,number.toUpperCase());
spec.appendWhere(sc, new int[] {wtPart});

 

Community Moderator
May 12, 2025

Hello @TDT

 

It looks like you have a response from our community champion. If it helped you solve your question please mark the reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.