⧼vector-jumptocontent⧽

Relation field

From EPrints Documentation


Description

This field is derived from a Compound field to store for relations. It contains to sub-fields: uri that store a URI for the object that is related and type for the type of relationship.

Inheritance

Additional Properties

As for Compound fields.

Required Phrases

In addition to Compound fields phrases, sub-field name phrases are needed for uri and type. In the forms:

dataset_id + "_fieldname_" + fieldname + "_uri"
dataset_id + "_fieldname_" + fieldname + "_type"

Database

Relation fields are stored in the database as:

fieldname_uri VARCHAR(255)
fieldname_type VARCHAR(255)

API

See API page.

Examples

Most basic example.

{
    name => 'relation',
    type => 'relation',
}

Storing multiple relations.

{
    name => 'relations',
    type => 'relation',
    multiple => 1,
}