Ticket S35082
Visible to All Users

DC - Support many-to-many associations between domain components

created 15 years ago

Proposed Solution:
Either support n:m associations with a hidden implicit link table (similarly to XPO), or support creating database indexes (IndexedAttribute) to allow explicit link table creation. Hope this approach will be supported in UI (SystemModules.Link - Support Many-To-Many associations created via an intermediate link class).

Comments (2)
DevExpress Support Team 15 years ago

    We decided not to implement implicit many-to-many relations in Domain Components. To create a many-to-many relation you must explicitly create an intermediate class (interface), and define two one-to-many relations.
    This scenario will be supported in XAF when the following suggestions are implemented:
    SystemModules.Link - Support Many-To-Many associations created via an intermediate link class,
    DC - Provide an analog of the XPO's IndexedAttribute.

    DevExpress Support Team 14 years ago

      We have changed our decision and are going to implement the built-in many-to-many relationship support in DC.

      Answers

      created 14 years ago (modified 7 years ago)

      Starting from version 11.1.3 you can use the following code, to define a M-M relationship between two domain components:

      C#
      [DomainComponent] public interface ITestManyToMany1 { String Name { get; set; } IList<ITestManyToMany2> List { get; } } [DomainComponent] public interface ITestManyToMany2 { String Name { get; set; } IList<ITestManyToMany1> List { get; } }

      Thanks,
      Dennis

        Comments (1)

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.