Custom Widget Association Definition

Hi, I have a custom widget where I use an entity with a one-to-many association. I would like to be able to define which entity is the 'many' in the modeler so that the custom widget can work across domain models, rather than using a domain model-specific "fetch." How would I set up an XML schema to allow for this? The pathType attribute for referenceSet seems to go the other direction in terms of association ownership/
1 answers


I think you always need to specify the path starting with the owning entity in a widget.

        <property key="child" type="entity" required="true">

        <property key="association" type="entity" required="true" isPath="yes" pathType="reference" entityProperty="child">

This means you need to separately specify the entity on the <many> end. Then set the association from that entity back to the other entity.

It's not perfect as the modeler will not validate that the selected association really targets the other entity, but it works.

regards, Fabian