How to display a one-to-many relationship in a web page?

0
Hello The reference set selector and reference selector widgets help to show many-to-many relationships or many-to-one relationships; but does not allow one-to-many relationships to be portrayed. Is there another way to do this? For example, in the Pizza Mario scenario, how do I represent how the orders for a specific person? Do I need to run a report to do this? Thanks in advance, Sarah
asked
2 answers
2

Add a datagrid to your person form and use the association between the person and the order as the data source

Edit after comments: I just downloaded the Pizza Mario project. Here is the domain model

domain model

Here is the Customer form with a new datagrid added using the association:

Orders datagrid

Here is how to select the association in the Connector in the modeler

connector

Added after comments:

Here's what a listening data grid looks like:

listening

answered
1

Data grids can only be used on a reference of which a child is the owner. In the pizza mario example an order is the owner of the Order_Customer relationship. This means that you can add a datagrid to the dataview of Customer where you can show all orders of that customer.

If you cannot see the reference in the prompt response then you either got your reference the wrong way around or you used a reference set. If you want to display a reference set you should add a reference set to customer That is opposite to the OrderCustomer association i.e. CustomerOrder. Then you will be able to add a reference set selector to the Customer dataview that shows all connected orders.

answered