How do we store multiple integer values in a Jazz Model?
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
swathi.rao wrote:
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 |
Thanks for the tip. It works fine now.
Swathi. |
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: |
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.