Data View widget and simple domain model.

0
I'm just starting with Mendix and working through tutorials but his what seems like a small snag. I have a simple domain model as described https://docs.mendix.com/refguide/domain-model but when I create a blank page with a Data View widget bound to the Customer entity the order relationship does not show up (either in the onverview or the create new page). What am I doing wrong?
asked
2 answers
3

Welcome! Most likely it has to do with the relationship of a Customer to Order being One to Many in your model. A customer will have multiple orders, so that relationship will be a one to many relationship. In your DataView (a single object widget) set to your customer, you would need to drop in a Reference Selector, for example, to see your Orders. Or better still, drop a Template grid or List view inside of the DataView and set the Source to your Order over an Association to start. 

 

answered
0

Thanks Nolan, you put me on the right track but I don't understand your comment about dropping in a reference selector in my DataView to see my orders.  Here is what worked for me

Customer_Overview page

  • DataGrid Type = Database, Entity = <Module>.Customer


Customer_NewEdit page

  • DataView Type = Association, Entity = <Module>.Order_Customer/<Module>.Order
    • ListView Type = Association, Entity = <Module>.Order


Order_Overview page

  • DataGrid Type = Database, Entity = <Module>.Order
    • Added column Attribute = <Module>.Order_Customer/<Module>.Customer/<Module>.Customer.Name
       

In Order_NewEdit page

  • DataView Entity = <Module>.Order
    • Reference selector Attribute = <Module>.Order_Customer/<Module>.Customer/<Module>.Customer.Name
answered