Compound field

From EPrints Documentation
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


Metadata Fields: Boolean - Compound - Multilang - Date - Time - Float - Int - Itemref - Pagerange - Set - Namedset - Subject - Text - Email - Longtext - Name - Url

Inheritance

Description

Properties

name default description
fields n/a This property is always required.
fields_cache n/a This property is always required.
show_in_fieldlist 0 ...

Required Phrases

Database

Each subfield within a compound field has its own table named <dataset>_<fieldname>_<subfieldname>. For example, the related URL for an EPrint (related_url) has a URL and a type, so would have tables named eprint_related_url_url and eprint_related_url_type.

The tables in this instance have the following structure:

eprint_related_url_url: eprintid INT(11), pos INT(11), related_url_url VARCHAR(255)
eprint_related_url_type: eprintid INT(11), pos INT(11), related_url_type VARCHAR(255)

eprintid is the ID of the EPrint to which the field applies, pos contains the position of the entry (starting at 0), and the remaining field uses the appropriate field type for the subfield (in this case VARCHAR(255) for both URL and type).


API