Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Serialize multivalued EReference
Serialize multivalued EReference [message #1314713] Fri, 25 April 2014 14:56 Go to next message
Nickie woo is currently offline Nickie wooFriend
Messages: 21
Registered: February 2014
Junior Member
Hi
Anyone know how to serialize an EReference with unlimited multiplicity ?

This is how i do with single valued reference
eobject.eSet(singleReference, value);


And it works fine the value get serialized

But when i do this nothing happens
EList<EObject> list = (EList<EObject>) eobject.eGet(attribute);
list.add(value);
parentBusinessObj.eSet(multiValReference, list);

Re: Serialize multivalued EReference [message #1314769 is a reply to message #1314713] Fri, 25 April 2014 15:41 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
On 25/04/2014 16:56, Nickie woo wrote:

> EList<EObject> list = (EList<EObject>) eobject.eGet(attribute);
> list.add(value);
> parentBusinessObj.eSet(multiValReference, list);
>
>

You don't need to call eSet if you just want to add an element. Just add
to the list returned by eGet and that works.
Re: Serialize multivalued EReference [message #1336516 is a reply to message #1314769] Tue, 06 May 2014 12:35 Go to previous message
Nickie woo is currently offline Nickie wooFriend
Messages: 21
Registered: February 2014
Junior Member
Oh i missed that
Thank you !
Previous Topic:[CDO] Server BufferUnderflowException when activating an SSL connection using the CDO Explorer
Next Topic:[Xcore] Copying content from one Xcore model to another programmatically
Goto Forum:
  


Current Time: Thu Apr 25 23:47:39 GMT 2024

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

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

Back to the top