Question regarding unique lists [message #484846] |
Wed, 09 September 2009 13:46 |
No real name Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hello,
i have used EMF to import a XML schema and generate a meta model from it.
When i load a model i see the odd behaviour that EMF uses a
EDataTypeUniqueElist to store values of an attribute, but the values are
not unique (they shouldn't be unique).
For example, i have a list of four values: 5,2,0,0. These values come from
an xml file and all are in the list, which is perfectly fine. But when i
create a new instance of that object and try to add the same values to the
list, than only 5,2,0 is added, because it is an unique list. The last
behaviour is what i would expect, but how can it be that the values are
not unique in the list, if i load a model from an xml file?
Regards,
Manfred
|
|
|
Re: Question regarding unique lists [message #484859 is a reply to message #484846] |
Wed, 09 September 2009 14:06 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Manfred,
Comments below.
Manfred wrote:
> Hello,
>
> i have used EMF to import a XML schema and generate a meta model from
> it. When i load a model i see the odd behaviour that EMF uses a
> EDataTypeUniqueElist to store values of an attribute, but the values
> are not unique (they shouldn't be unique).
The XSDEcoreBuilder generally sets isUnique to false for EAttributes for
which upperBound > 1... There is an ecore:unique attribute one could
use, but it doesn't look like that should be necessary. Which version
of EMF are you using? Do you have an example I can try?
> For example, i have a list of four values: 5,2,0,0. These values come
> from an xml file and all are in the list, which is perfectly fine. But
> when i create a new instance of that object and try to add the same
> values to the list, than only 5,2,0 is added, because it is an unique
> list. The last behaviour is what i would expect, but how can it be
> that the values are not unique in the list, if i load a model from an
> xml file?
> Regards,
>
> Manfred
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03180 seconds