Custom Widget Association Definition

3
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/
asked
1 answers
3

Hi,

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>

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

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

answered