Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 372307 - [Legacy] eContainer changes not properly propagated
Summary: [Legacy] eContainer changes not properly propagated
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.legacy (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-23 04:12 EST by Steve Monnier CLA
Modified: 2012-09-21 06:51 EDT (History)
3 users (show)

See Also:


Attachments
Junit test case (4.77 KB, application/octet-stream)
2012-02-23 04:45 EST, Steve Monnier CLA
stepper: iplog+
Details
JUnit test case new version (5.91 KB, application/octet-stream)
2012-02-23 12:39 EST, Steve Monnier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Monnier CLA 2012-02-23 04:12:44 EST
Build Identifier: 

Moving a legacy model element to another container does not seems to be properly propagated.
For instance, if an element E is contained in a container C1 and moved to C2, other clientd will see that :
- C1 has no contents,
- C2 contains E,
- but the container of E is still C1.

Eike, I let you complete this issue with the JUnit and patch we exchanged.

Thanks,
Steve

Reproducible: Always

Steps to Reproduce:
1.Change container of a legacy model element and commit
2.Check the eContainer feature of this element on an other client
Comment 1 Steve Monnier CLA 2012-02-23 04:15:49 EST
This issue happened on CDO 4.0 maintenance branch.
Comment 2 Steve Monnier CLA 2012-02-23 04:45:13 EST
Created attachment 211475 [details]
Junit test case

I confirm that:

1) The number of lines that I changed is smaller than 250.
2) I am the only author of these changed lines.
3) I apply the EPL to these changed lines.
Comment 3 Eike Stepper CLA 2012-02-23 04:50:11 EST
commit 3c9c1a9c8438bc0e3db0de8367fbf1a8cf8c3117
Comment 4 Eike Stepper CLA 2012-02-23 04:50:46 EST
Port to 4.1 via bug 372311.
Comment 5 Steve Monnier CLA 2012-02-23 12:39:53 EST
Created attachment 211520 [details]
JUnit test case new version
Comment 6 Steve Monnier CLA 2012-02-23 12:48:13 EST
Hi Eike,

As we talk today, I reopened the issue and added a new version of the JUnit test case. You will see that the containment feature of the element session2d is null.

Thanks,
Steve
Comment 7 Eike Stepper CLA 2012-02-24 02:44:33 EST
Seems we need to call

  store.setContainer(object, null, container, InternalEObject.EOPPOSITE_FEATURE_BASE - containingFeatureID);
  
rather than 

  store.setContainer(object, null, container, containingFeatureID);
Comment 8 Eike Stepper CLA 2012-02-24 02:53:27 EST
commit a9bf83c5515f541052263dfc1f814c74fedb1c6f
Comment 9 Eike Stepper CLA 2012-09-21 06:51:40 EDT
Closing.