Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: QuerySpec to find all childs by parent

$
0
0

Hi Vasiliy ,

 

Can you kindly specify your process of creating your own parent ,child and link class

?

 

When you are writing

QuerySpec querySpec = new QuerySpec();

 

int parentIndex = querySpec.appendClassList(Parent.class, false);

int linkIndex = querySpec.appendClassList(ParentChildLink.class, false);

int childIndex = querySpec.appendClassList(Child.class, false);

 

that means the QuerySpec will query the above listed tables but as the second paramete is false it will return no object at all.

 

When we write like QuerySpec qr = new QuerySpec(Child.class); It means it will query the table and return Child object.

 

You can also write it like QuerySpec qr = new QuerySpec();

int index = qr.appendClassList(Child.class,true);

 

Thanks and Regards,

Kaushik


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>