Your stereotype is doing exactly what you told it to do. Designating
the stereotype property as a composite aggregation means that the
stereotype owns the objects in that property. So, if you add an element
from your model to that stereotype property, the element becomes owned
by that stereotype instance. Thus it is no longer owned by the model
element that contained it previously.

Probably this particular stereotype property should not be a composite
aggregation.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Martynas,<BR>
<BR>
Your stereotype is doing exactly what you told it to do.&nbsp; Designating the stereotype property as a composite aggregation means that the stereotype owns the objects in that property.&nbsp; So, if you add an element from your model to that stereotype property, the element becomes owned by that stereotype instance.&nbsp; Thus it is no longer owned by the model element that contained it previously.<BR>
<BR>
Probably this particular stereotype property should not be a composite aggregation.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Tue, 2009-12-15 at 17:13 +0200, Martynas Lelevicius wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hello,

Suppose I have an element and assign it as a stereotype value:
1) If stereotype property aggregation is None, or Shared everything is ok.
2) If stereotype property aggregation is Composite, the element is removed
from its owner.

I've attached the code sample.
Is it a bug, &quot;feature&quot;, or something else?

Suppose I have an element and assign it as a stereotype value:
1) If stereotype property aggregation is None, or Shared everything is ok.
2) If stereotype property aggregation is Composite, the element is removed
from its owner.

I've attached the code sample.
Is it a bug, "feature", or something else?

Your stereotype is doing exactly what you told it to do. Designating
the stereotype property as a composite aggregation means that the
stereotype owns the objects in that property. So, if you add an element
from your model to that stereotype property, the element becomes owned
by that stereotype instance. Thus it is no longer owned by the model
element that contained it previously.

Probably this particular stereotype property should not be a composite
aggregation.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Martynas,<BR>
<BR>
Your stereotype is doing exactly what you told it to do.&nbsp; Designating the stereotype property as a composite aggregation means that the stereotype owns the objects in that property.&nbsp; So, if you add an element from your model to that stereotype property, the element becomes owned by that stereotype instance.&nbsp; Thus it is no longer owned by the model element that contained it previously.<BR>
<BR>
Probably this particular stereotype property should not be a composite aggregation.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Tue, 2009-12-15 at 17:13 +0200, Martynas Lelevicius wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hello,

Suppose I have an element and assign it as a stereotype value:
1) If stereotype property aggregation is None, or Shared everything is ok.
2) If stereotype property aggregation is Composite, the element is removed
from its owner.

I've attached the code sample.
Is it a bug, &quot;feature&quot;, or something else?