How to use query model on helper items
Hi,
I am extending the Jazz provided repository with my own data model. I need to query on certain attributes which have been marked as queryable in a helper data item. However, how do I initialize the QueryModel in such a case. For SimpleTypes, I have been using: <Item>QueryModel.<Item>QueryModel.ROOT However, in the query model generated for helper items, I do not get the ROOT attribute Thanks - Vibha |
3 answers
'Helper' models are, by definition, not root level Items. You can only
store a Helper model by attaching it to an Item, and you can only query for it by starting at an <Item>QueryModel.ROOT and traversing a queryable path to the helper. vssinha wrote: Hi, |
Hi
Pardon my ignorance, but would it be possible to get an example of how to traverse a queryable path to the helper ? Thanks |
If ItemA has a HelperB that has a queryable attribute c, you can do the
following (Note that you can traverse a helper only from an item that owns it).. ItemAQueryModel x = ItemAQueryModel.ROOT; IItemQuery q = IItemQuery.FACTORY.newInstance(x); q.filter(x.helperB().attributeC()._eq(.....) ------- Balaji "vssinha" <vibha> wrote in message news:g6v6hg$aeu$1@localhost.localdomain... Hi |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.