expressappframework-403920-debugging-testing-and-error-handling-code-diagnostics-xaf0015.md
Severity: Warning
Many-to-Many associations must not have Aggregated attribute on any ends. One-to-Many associations must not have Aggregated attribute on “one” ends.
using DevExpress.ExpressApp;
namespace MySolution.Module.BusinessObjects {
[Persistent]
public class OneToManyAssociationBothAggregated {
// One-to-Many association should not have Aggregated attribute on "one" end
[Association, Aggregated]
public OneToManyAssociationBothAggregated Parent {
get { ... }
set { ... }
}
[Association, Aggregated]
public XPCollection<OneToManyAssociationBothAggregated> Children {
get { ... }
}
}
[Persistent]
public class ManyToManyAssociationBothAggregated {
// Many-to-Many association should not have Aggregated attribute on any end
[Association, Aggregated]
public XPCollection<ManyToManyAssociationBothAggregated> Friends {
get { ... }
set { ... }
}
// Many-to-Many association should not have Aggregated attribute on any end
[Association, Aggregated]
public XPCollection<ManyToManyAssociationBothAggregated> Colleagues {
get { ... }
set { ... }
}
}
}
using DevExpress.ExpressApp;
namespace MySolution.Module.BusinessObjects {
[Persistent]
public class OneToOneAssociationBothAggregated : BaseObject {
[Association, Aggregated]
public OneToOneAssociationBothAggregated PropertyOne {
get { ... }
set { ... }
}
[Association, Aggregated]
public OneToOneAssociationBothAggregated PropertyTwo {
get { ... }
set { ... }
}
}
[Persistent]
public class OneToManyAssociationManyAggregated : BaseObject {
[Association]
public OneToManyAssociationManyAggregated Parent {
get { ... }
set { ... }
}
[Association, Aggregated]
public XPCollection<OneToManyAssociationManyAggregated> Children {
get { ... }
}
}
}