Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to copy eResources such that xmi ids are maintained across resources
https://www.eclipse.org/forums/index.php/mv/msg/193730/615995/#msg_615995
newResource) such that the newResource keeps the same xmi ids of the model
eobjects persisted in the oldResource.
This is what I am currently doing ..
Resource oldResource = myEObject.eResource();
ResourceSet resourceSet = oldResource.getResourceSet();
URI originalUri = oldResource.getURI();
Resource newResource = resourceSet.createResource(originalUri);
newResource.setURI(newURI);
newResource.getContents().add(newDD);
newResource().save(new HashMap());
After creating and persisting the newResource I dont see the XMI ids of
the eObjects in oldResource copy over to the newResource.
Can someone please help. What do I need to do here ...?
Thanks in advance,
Rohit Kelapure]]>Rohit Kelapure2008-03-26T19:40:30-00:00