It's all about the answers!

Ask a question

How do we store multiple integer values in a Jazz Model?


Swathi Rao (5112) | asked Jan 31 '08, 3:41 a.m.
JAZZ DEVELOPER
Hi,

I have created a model with an Item called "BugChain" (a SimpleItem Type) which contains a list of EIntegerObjects. Upon executing the JUnit Test to rebuild the repository database with the new model, I get a MappingException :

com.ibm.team.repository.service.internal.verticalRegistry.MappingException: Mapping the 'BugChain' type failed
...
...
Caused by: com.ibm.team.repository.service.internal.verticalRegistry.MappingException: Multi-valued attributes are not supported: BugChain#bugIntroducedVersion (EIntegerObject)
... 85 more

I need to store the result of my computation which contains multiple int values in the Model, which is why I created a list of EIntegerObjects.

Any idea if there is another way of doing the same?

Swathi.

3 answers



permanent link
Chris Daly (61651) | answered Jan 31 '08, 1:18 p.m.
JAZZ DEVELOPER
swathi.rao wrote:

I need to store the result of my computation which contains multiple
int values in the Model, which is why I created a list of
EIntegerObjects.

Any idea if there is another way of doing the same?

Swathi.


One workaround to this that occurs to me is to create a Helper with a
single attribute and then create a list of the helper type. I've
created defect 43134 for this and I attached a screenshot that shows
what I mean (see
https://jazz.net/jazz/resource/itemName/WorkItem/43134). I don't know
if this will scale well to very large lists. Maybe someone on the
Repository team can comment on that....

By the way, for Jazz 0.6 the contract for what constitutes a valid Jazz
Ecore storage model (for code generation and database creation) has not
been solidified. The best we have is a set of guidelines and I think
these are most clearly spelled out in the JazzBot tutorial here:

https://jazz.net/wiki/bin/view/Main/JazzBotWalkthrough

However JazzBot is currently wrong in this area (it says EAttributes may
be multiplicity-many) so I will fix that.

--
Chris Daly
Jazz Component Development Team

permanent link
Swathi Rao (5112) | answered Feb 01 '08, 8:10 a.m.
JAZZ DEVELOPER
Thanks for the tip. It works fine now.

Swathi.

permanent link
Ritchie Schacher - IBM (47611) | answered Feb 01 '08, 10:52 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Chris,

The workaround you suggest is exactly what we've been teaching people. You
are right that for large lists it will increase the size of the item object.
However, from an rdb-mapping perspective, the way we map the helpers is
almost identical to how we would map the list of attributes if it were
supported. That is, the list of attributes would need it's own queryable
table with a row for each element in the list.

--
Ritchie

**********************************************
Ritchie Schacher
Jazz Repository component lead
IBM/Rational RTP Lab
schacher@us.ibm.com
"Chris Daly" <cjdaly@us.ibm.com> wrote in message
news:fnt358$9qf$1@localhost.localdomain...
swathi.rao wrote:

I need to store the result of my computation which contains multiple
int values in the Model, which is why I created a list of
EIntegerObjects. Any idea if there is another way of doing the same?
Swathi.


One workaround to this that occurs to me is to create a Helper with a
single attribute and then create a list of the helper type. I've created
defect 43134 for this and I attached a screenshot that shows what I mean
(see https://jazz.net/jazz/resource/itemName/WorkItem/43134). I don't
know if this will scale well to very large lists. Maybe someone on the
Repository team can comment on that....

By the way, for Jazz 0.6 the contract for what constitutes a valid Jazz
Ecore storage model (for code generation and database creation) has not
been solidified. The best we have is a set of guidelines and I think
these are most clearly spelled out in the JazzBot tutorial here:

https://jazz.net/wiki/bin/view/Main/JazzBotWalkthrough

However JazzBot is currently wrong in this area (it says EAttributes may
be multiplicity-many) so I will fix that.

--
Chris Daly
Jazz Component Development Team

Your answer


Register or to post 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.