This KB article talks about a 1:N relation while the
OP asked for a M:N relation.
Try this:
public class Component : XPObject
{
public Component(Session session) :
base(session) { }
private string _name;
public string Name
{
get { return
_name; }
set {
SetPropertyValue<string>("Name", ref _name, value); }
}
[Association("IsPartOf:Parts")]
public XPCollection<Component>
IsPartOf
{
get { return
GetCollection<Component>("IsPartOf"); }
}
[Association("IsPartOf:Parts")]
public
XPCollection<Component> Parts
{
get { return
GetCollection<Component>("Parts"); }
}
}
HTH, Robert