Quantcast
Channel: PTC Community : Unanswered Discussions - Windchill
Viewing all articles
Browse latest Browse all 3592

How Do I Query For All IBA Definition References Used In AbstractValue Tables

$
0
0

In 9.1, I'm trying to query for instance based attribute defs that are actually assigned to my pbos and I can't get this part of the query right because definitionReference isn't available on the iba value super class (AbstractValue).  It is, however, on each and every sub tableexpression.tableClass that the queryspec puts together.  Does anybody have any ideas?  I don't think I've ever put a CompoundQuerySpec together and used the JOIN SetOperator in WC.  Is that the right approach?

 

Here's a piece from my original query.  You can just throw a persistenceserverhelper.query on the end, I guess:

final String DR = StringValue.DEFINITION_REFERENCE; //definitionReference

QuerySpec qs = new QuerySpec();

int valueIndex = qs.appendClassList(AbstractValue.class, false);

qs.appendSelectReference(DR + ".key", valueIndex, false);     //Can't remember if this boolean should be true or false.  I want to return this attribute.

qs.setDistinct(true); //idk if setDistinct will work for references, but I'm assuming it does.

 

Anybody have any thoughts or a quick example you can throw together?


Viewing all articles
Browse latest Browse all 3592

Trending Articles