I have two entities 1-Customer and 2-Order, and each customer can place multiple orders. How should I model this relationship in my domain model?

0
I have two entities 1-Customer and 2-Order, and each customer can place multiple orders. How should I model this relationship in my domain model? 
asked
1 answers
1

Hi Sachin,

In Mendix, to model the one-to-many relationship where each Customer can place multiple Orders, you need to create two entities in the domain model: Customer and Order. Then, define an association from Customer to Order with the owner set to Customer. This association should be of type one-to-many, meaning one Customer can be linked to many Order objects. Mendix will automatically name the association (e.g., Customer_Order), and you can use it in microflows or pages to retrieve, display, or manipulate a customer’s related orders. This structure accurately reflects the domain logic and supports data integrity and reusability.

 

 

Hope it helps..!

answered