Difference between revisions of "Itemref field"
(Added consistent structure) |
m |
||
| Line 23: | Line 23: | ||
== Database == | == Database == | ||
| − | + | Itemref fields are stored in the database as | |
fieldname INT(11) | fieldname INT(11) | ||
Revision as of 11:27, 23 March 2023
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Metadata Fields: Arclanguage - Base64 - Bigint - Boolean - Compound - Counter - Dataobjref - Date - Decimal - Email - Fields - Float - Id - Idci - Image - Int - Itemref - Keywords - Langid - Longtext - Longtext_counter - Multilang - Multipart - Name - Namedset - Pagerange - Recaptcha - Recaptcha3 - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid
Description
This field allows another data object to be referenced, which belongs to a specified datasetid.
Inheritance
Properties
As for Int fields with the following differences...
| name | default | description |
| datasetid | n/a | This property is always required. |
Required Phrases
No additional phrases.
Database
Itemref fields are stored in the database as
fieldname INT(11)
API
See API page.
Examples
Most basic example.
{
name => 'userid',
type => 'itemref',
datasetid => 'user',
},
To specify one eprint succeeds another. This may not always be required and if you clone the eprint record the new eprint should not succeed the same eprint.
{
name => 'succeeds',
type => 'itemref',
required => 0,
datasetid => 'eprint',
can_clone => 0,
}
You might create a data object that groups together several eprints
{
name => 'items',
type => 'itemref',
datasetid => 'eprint',
multiple => 1,
required => 1,
}