Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    One-To-Many setup

    I have a field that is a list of foreign keys and is defined in my ds.xml as:
    Code:
    <field name="groupName" includeFrom="genericGroup.name" hidden="true"/> 
    
    <field name="genericGroups" foreignKey="genericGroup.id" displayField="groupName" type="text" multiple="true">
    I am not sure if I have the includeFrom defined properly since the fk field is a multiple (list of ids).

    Any tips or advice on the correct way to achieve this?

    I do see my fetch to get the displayField(s) being called for the DSRequest via the method "applyRelatedDSRequest(String, List, List, Relation, DSResponse)" but I think i have something not quite right since I don't see the display fields even though I return them. Should I see them going back in the response somewhere?

    Thanks.

    #2
    You have to give us at least some hints about which product and what type of persistence you're using to get useful help, but at a guess, you might be looking for dataSourceField.includeSummaryFunction, which defines the means by which multiple values from related records can be aggregated into one includeFrom field.

    Comment

    Working...
    X