Well, it started as an excersize to avoid having to do things like that
:)
hope that helps,
Do you know how relationships are handled :)
Relationships are one of the weaker points in magritte.
Yes. I think that we should increase the use of magritte so that it can improve.
It would need some love to make it more usable. In Magritte-XML we took a few side ways. When it comes to descriptions in relationships it is important who is in control of the "real" description of an object. In Magritte-Xml we support two use cases. The default option is to support inheritance. That means if you navigate a relationship each object is asked for its description. This way an object you get can be a subclass of the object you described. The second option I need more often is to inject descriptions into a relationship. Meaning the description of the relationship defines the description for the contained objects. This way I can alter the use of my objects by the way the objects are approached/by use case. This can be done by setting #reference: on your relationship description and by specifying "beDescribedByReference" to the relationship description. Sadly I couldn't come up with a nicer selector :) As an example I use
COUserSession>>#userDescription
<magritteDescription> ^MAToOneRelationDescription new accessor: #user; label: 'User of App'; classes: (Array with: COUser); beDescribedByReference; reference: (COUser new remoteDescription kind: COUser); beXmlElement; beInlined; priority: 20; yourself
Here "remoteDescription" includes a reduced view of the user for remote usage. It contains just two values of the user instead of everything. By additionally defining "beInlined" you can prevent the relationship to create an additional element. Otherwise the relationship would create a xml element and the object as well. While I'm writing this I'm not sure if the setting for kind: is still needed. Nick did something so you don't need to set it like this, I think. I hope he will read this and clarifies the use.
Somehow. I have to play with it. And if you come at esug I would really like to sit with you.
One of my simple use case is that I have a container and elements and I would like to save in xml the container and its elements. Now the relation between container and elements is a relationship.
Regarding your other mail. I cannot tell much about the option descriptions in Magritte-Xml. I never used them myself and so I'm no expert. Jan could say something about them and IIRC Nick (again) did something with the multiple option description.
I will look deeper into it now
hope that helps,
Norbert