oils_persist:readonly="true">
<fields>
<field name="source" reporter:datatype="id" />
- <field name="value" reporter:datatype="text"/>
<field name="name" reporter:datatype="text"/>
+ <field name="field" reporter:datatype="link"/>
+ <field name="value" reporter:datatype="text"/>
</fields>
<links>
<link field="source" reltype="has_a" key="id" map="" class="bre"/>
+ <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
<link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
SELECT
mde.source,
cdfm.name,
+ mde.field,
CASE WHEN cdfm.multi THEN
TO_JSON(ARRAY_AGG(value))
ELSE
END AS value
FROM metabib.display_entry mde
JOIN config.display_field_map cdfm ON (cdfm.field = mde.field)
- GROUP BY 1, 2;
+ GROUP BY 1, 2, 3;
CREATE INDEX metabib_display_entry_field_idx
ON metabib.display_entry (field);