Data grid only showing references to manually added records

0
Lets say I have a "Customer". Each "Customer" can have many "Order"(s). A customer then should have one (1-1) "Favourite" entity, showing only orders he manually added there. It must be just a reference so if the order gets deleted, it will disappear from the "Favourite" entity. I tried association but it seems I still can create orders in the Favourite which are new, not references to existing orders.
asked
2 answers
1

1-1 association means that 1 favorite object can be associated to 1 customer object. So if two customers choose the same order as a favorite, the previous association will be overwritten. The many to 1 association(customer* - order1) will allow many customers to choose a order as a favorite. So you don't need the favorite entity.

answered
0

Create a entity Customer with a one to many relation to order, also create a many to 1 relation from customer to order to maintain the favourite. On your customer form create a dropdown/popup in which you can select the favourite order, restriction is that only customer orders can be selected. On your order create a microflow button in which you can add the order as the favourite order for the customer associated. Your orders will be created using the 1 to many relation from customer to order.

answered