I wanted an entity to entity relationship similar to nested entity relationship. How do I achieve that?

0
I want to a one-to-many relationship between two entities. For example, a store entity has a pencil entity in it. Each pencil has Name and Qty. Every store will have different pencils with different quantities.    When I create an association of 1-to many in Mendix. It does not give me the OPTION to assign value to  the "MANY" entity in CREATE OBJECT activity. If I manage to add pencil records in the PENCIL entity, I still won't get the option to assign it to an OBJECT of store with association property.    Using latest Mendix version 10.9.0
asked
2 answers
1

Hi Priya,

Your association should be something like

 store 1-* pencil

 

This will enable you to choose a shop name while creating the pencil object.

Hope this answers what you are looking for,

If there's anything else, pls do write in the comment

answered
0

Hello Priya,

 

Because it are different products you can try the following:

 

For the Store form you can add a reference set selector for an example watch in the administration module for the accoun_new page and then userroles

 

Another option for the store form is to add a datagrid to your form with create and delete buttons and show the pencils over association

 

For the pencil form you can use the reference selector. 

 

All the tools are in the toolbox:

 

image.png

 

If the selectors remain inactivated first check the entity acces and association on both entities.

 

Hope this helps,

 

Good luck!

answered