Deleting a reference from a CompartmentShape?<p>It's day 2 of my effort to create a DSL. Day 1 went pretty well, just a few issues to deal with.<br><br>I could do with some help with this one, though.<br><br>I have<br><br>ClassA references ClassB (a many-to-many relationship)<br><br>ClassA is represented by a Compartment Shape, ClassAShape<br><br>ClassB is represented as a Compartment Item in ClassAShape, but also has it's own ClassBShape directly on the model surface<br><br>I establish the relationship by connecting ClassAShape to ClassBShape. I don't have (or want) a physical connector on the design surface between the two shapes. Instead, my ClassB appears in the relevant compartment in ClassAShape.<br><br>So far, so good.<br><br>Now, if I right-click and Delete the Compartment Item for ClassB from the ClassAShape, it deletes ClassB from the model completely. What I want, is for it to simply remove the relationship.<br><br>Any advice?<br><br>Regards,<br>Steve<br><br></p>© 2009 Microsoft Corporation. All rights reserved.Sat, 30 Aug 2008 04:37:59 Zfaf2852f-a363-4dc1-be3c-36df4a065ef8http://social.msdn.microsoft.com/Forums/en/vsx/thread/faf2852f-a363-4dc1-be3c-36df4a065ef8#faf2852f-a363-4dc1-be3c-36df4a065ef8http://social.msdn.microsoft.com/Forums/en/vsx/thread/faf2852f-a363-4dc1-be3c-36df4a065ef8#faf2852f-a363-4dc1-be3c-36df4a065ef8SmorgoOfFJShttp://social.msdn.microsoft.com/Profile/en-US/?user=SmorgoOfFJSDeleting a reference from a CompartmentShape?<p>It's day 2 of my effort to create a DSL. Day 1 went pretty well, just a few issues to deal with.<br><br>I could do with some help with this one, though.<br><br>I have<br><br>ClassA references ClassB (a many-to-many relationship)<br><br>ClassA is represented by a Compartment Shape, ClassAShape<br><br>ClassB is represented as a Compartment Item in ClassAShape, but also has it's own ClassBShape directly on the model surface<br><br>I establish the relationship by connecting ClassAShape to ClassBShape. I don't have (or want) a physical connector on the design surface between the two shapes. Instead, my ClassB appears in the relevant compartment in ClassAShape.<br><br>So far, so good.<br><br>Now, if I right-click and Delete the Compartment Item for ClassB from the ClassAShape, it deletes ClassB from the model completely. What I want, is for it to simply remove the relationship.<br><br>Any advice?<br><br>Regards,<br>Steve<br><br></p>Thu, 21 Aug 2008 09:55:00 Z2008-08-21T09:55:00Zhttp://social.msdn.microsoft.com/Forums/en/vsx/thread/faf2852f-a363-4dc1-be3c-36df4a065ef8#6cac2cec-f2bf-47b6-81de-fb55c5c6f956http://social.msdn.microsoft.com/Forums/en/vsx/thread/faf2852f-a363-4dc1-be3c-36df4a065ef8#6cac2cec-f2bf-47b6-81de-fb55c5c6f956Jean-Marc Prieurhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jean-Marc%20PrieurDeleting a reference from a CompartmentShape? Hello Steve<br><br>I have reproduced your problem, and will try to help you. Im currently working on it. Indeed, I'm wondering if we should remove the related ClassB since, after all, this is a reference relationship and not an embedding. I'll try to provide you with an answer quickly.<br><br><br>I have, however a question (by curiosity). How do you add a classB compartment item classA representing Compartment shape, if you do not have connectors between your Compartment ClassAShape and your ClassBShapes?<hr size="1" align="left" width="25%">Jean-MarcFri, 29 Aug 2008 11:56:19 Z2008-08-29T11:56:19Zhttp://social.msdn.microsoft.com/Forums/en/vsx/thread/faf2852f-a363-4dc1-be3c-36df4a065ef8#a60f7dba-16c1-44df-8849-9de193ccf064http://social.msdn.microsoft.com/Forums/en/vsx/thread/faf2852f-a363-4dc1-be3c-36df4a065ef8#a60f7dba-16c1-44df-8849-9de193ccf064Jean-Marc Prieurhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jean-Marc%20PrieurDeleting a reference from a CompartmentShape? Steve.<br><br>I wrote a <a href="http://blogs.msdn.com/jmprieur/archive/2008/08/30/dsl-tools-reference-relationships-and-compartment-shapes.aspx">post</a> on my blog explaining why the behavior is this one (thanks for letting me discover it), and how you can solve your problem specifying your intent (compartment items represent links, and not ClassBs)<hr size="1" align="left" width="25%">Jean-MarcSat, 30 Aug 2008 04:37:49 Z2008-08-30T04:37:49Z