Skip to main content
18-Opal
May 4, 2025
Question

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

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 });

2 replies

avillanueva
23-Emerald II
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});

 

Translate
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.

Translate