|
Re: Ecore containment property. [message #1833021 is a reply to message #1832999] |
Wed, 30 September 2020 18:12 |
|
Hi, Radu,
Would it be sufficient for your purpose that the lists in classes B and C be plain references (not containment) and the instances of A be contained independently of the Bs and Cs? What object contains Bs and Cs? It could also contain the As and then the Bs and Cs would just cross-reference a subset of the As, and your application can take whatever steps are necessary to reference the same As in a matched B/C pair.
HTH,
Christian
|
|
|
|
Re: Ecore containment property. [message #1833141 is a reply to message #1833140] |
Sat, 03 October 2020 11:58 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
This is why Christian is asking about what contains the Bs and the Cs. In general you need to ensure that all objects are directly or indirectly contained by a Resource. So if B's and C's don't contain the As, but only reference them, then something else needs to contain the As, i.e., directly in some Resource.getContents() (the same one as contains the Bs and Cs) or by virtue of being contained by something else for which this recursively is true. I other words, all the reachable objects must have eResource() != null for the overall serialization to work.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03598 seconds