This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Objects in aggregation are not written into XMI. Bug probably lies in XMIWriterImpl: in writePackage() they are intentionally skipped (there is a comment: "non-outermost instance is serialized as a part of content of an outermost instance"), but they are not written in writeInstance(). Test case follows (no patch, sorry).
Created attachment 5871 [details] test case
Created attachment 5872 [details] test model in XMI
Created attachment 5873 [details] written XMI with two instances (before aggregation is created)
Created attachment 5874 [details] written XMI with only one instance (after aggregation is created)
Bug fixed in main trunk. One remark: The attached test model uses "shared" aggregation type. Note that this type is not supported in MOF 1.4 (according to the specification), thus if encoutered mdr treats it as "none" aggregation type, i.e. it is not composite. It is better to use "none" or "composite" types only.