Associations.

0
 I made associations between three entities for simple restaurant app. Could you please tell me the associations I made right or wrong.  
asked
3 answers
1

I think just like the other answers you should try your Domain Model first and see where are the pain points and improve from there. There is no perfect world.

However i have seen the below model in the past.

  1. Customer does not directly associate with the products or items
  2. Customer has Many Orders
  3. Order has LineItems which are nothing but Products.

That way you can have good seggregation of duties between the entities. Then again this is 1 Dev’s View :)


Apply with caution :)

answered
0

Hi Ladi,

 

This depends on your Use Case.

Actually, many Customer can have many Items and 1 Orderdetails.

And one Item many Orderdetails.

 

Check out the Academy Courses for more Infos about Domain Models.

 

Good Luck,

 

answered
0

Hello,

 

In my opinion, your diagram contains these mistakes:

1) Use only singular noums to identify your entities (i.e. Item) and Mendix best practices recomends you use a CamelCaps between nouns of your entities, use only Customer and Order to identify your entities, verify identifiers of your attributes too;
Verify more best practices at this link: https://docs.mendix.com/refguide/dev-best-practices/#321-entity-names

 

2) Item have a relationship only with Order, remove the relationship between Customer and Item;


3) The relantionship between Customer and Order is inverted, because one Customer can issue many orders

answered