It's all about the answers!

Ask a question

How to add an attribute to the item handle?


Debarshi Ghosh (11) | asked Dec 10 '08, 4:39 p.m.
I want to add an attribute to the ItemHandle of a new type that I am creating so that I do not have to resolve the handle every time I want to retrieve the value of this attribute.

Here is what I am currently doing :

I am creating a new EClass (say newItem) which inherits from SimpleItem. I am creating the handleAttribute and adding teamAttribute belongsToHandle > true to it. Yet, while generating the component the following error pops up :

The type newItem has two query model parents SimpleItem and newItemHandle that cannot be merged.

Please let me know how I can achieve this. Thanks!

One answer



permanent link
Ritchie Schacher - IBM (47611) | answered Dec 11 '08, 9:28 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
The specific error you reference is coming from the query model generation .
That said, I don't think we really support the "belongsToHandle" property
for component authors.

If you are looking for partial items, you would not store additional
attributes with item handles, but rather should use the repository APIs to
fetch partial items - you can pass an array of item handles and specify
which properties you are interested in.
--
Ritchie Schacher
Jazz Server Development


"debarshi" <debarshi> wrote in message
news:ghpdec$5f9$1@localhost.localdomain...
I want to add an attribute to the ItemHandle of a new type that I am
creating so that I do not have to resolve the handle every time I
want to retrieve the value of this attribute.

Here is what I am currently doing :

I am creating a new EClass (say newItem) which inherits from
SimpleItem. I am creating the handleAttribute and adding
teamAttribute belongsToHandle > true to it. Yet, while generating
the component the following error pops up :

The type newItem has two query model parents SimpleItem and
newItemHandle that cannot be merged.

Please let me know how I can achieve this. Thanks!

Your answer


Register or to post your answer.