Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Unique=false for EAttribute(How to best implement unique=false for EAttribute)
Unique=false for EAttribute [message #1726562] Mon, 14 March 2016 16:40 Go to next message
Philipp Kutter is currently offline Philipp KutterFriend
Messages: 306
Registered: July 2009
Senior Member
As fas as I know, in ECore, the generated code always implements OrderedSet (Lists without duplicates)

There is a bugzilla regarding the question how to fix this for EReferences.

What is the status for EAttributes? What is the best way to implement unique=false for simple EAttributes, such that we get a Sequence (List with possible duplicates) in the Java code, as well as in the OCL.

Any hint welcome.

((And forgive me if this was already fixed, or never an issue for EAttributes, but only for EReferences.))
Re: Unique=false for EAttribute [message #1726572 is a reply to message #1726562] Mon, 14 March 2016 17:35 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

EAttributes must be ok; we'd have endless complaints if they didn't
allow duplicates.

Ecore doesn't inherently implement OrderedSet, which would apply fast
Set functionality. Ecore provides EList everywhere, sometimes with slow
linear search Set functionality.

Regards

Ed Willink


On 14/03/2016 16:40, Philipp W. Kutter wrote:
> As fas as I know, in ECore, the generated code always implements
> OrderedSet (Lists without duplicates)
>
> There is a bugzilla regarding the question how to fix this for EReferences.
>
> What is the status for EAttributes? What is the best way to implement
> unique=false for simple EAttributes, such that we get a Sequence (List
> with possible duplicates) in the Java code, as well as in the OCL.
>
> Any hint welcome.
>
> ((And forgive me if this was already fixed, or never an issue for
> EAttributes, but only for EReferences.))
Re: Unique=false for EAttribute [message #1726586 is a reply to message #1726572] Mon, 14 March 2016 20:41 Go to previous message
Philipp Kutter is currently offline Philipp KutterFriend
Messages: 306
Registered: July 2009
Senior Member
Thanks a lot!!
Previous Topic:Unresolved reference '//@class.1'
Next Topic:Ecore model for Guava Types
Goto Forum:
  


Current Time: Thu Apr 18 09:52:23 GMT 2024

Powered by FUDForum. Page generated in 0.01817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top