Table of Contents

New Developers Working Group

The Fieldmapper

The fieldmapper (fm_IDL.xml) maps the fields! It defines objects’ fields, linked fields from other objects, and permissions needed to access various things. Most of the Evergreen code (including the reports engine) accesses the database content via the fieldmapper rather than accessing the database directly.

The fieldmapper is installed in two locations on your server:

To view the current fieldmapper on your own site through a browser:

Outline of fieldmapper classes:

Things to Add to This Page:

Parts of the Fieldmapper

class header

class

This is the shortened term to describe this set of information. If your class will be accessible to pcrud, this is the term you'll use to reference this class in other places in the code.

controller

There are multiple values possible for this field. They include:

oils_obj:fieldmapper

oils_persist:tablename

oils_persist:virtual

This essentially means that the class or field is not "real" in the actual database table, only in the context of the IDL. It is often used for links to other classes:

<field reporter:label="Hours of Operation" name="hours_of_operation"
 oils_persist:virtual="true" reporter:datatype="link"/>

It can also be used to indicate such things as a view that is defined by SQL in the IDL rather than in the database.

oils_persist:readonly

reporter:core

If set to true, this view will show up in the list of core report sources.

Only use this if the value is true. It should be written as

reporter:core="true"

reporter:label

This will be the name of your view in list of available report sources in the reporter, so it should be in readable language.

fields

oils_persist:primary

oils_persist:sequence

field reporter:label

name

reporter:datatype

reltype

These distinctions are to indicate key directionality. They are not to indicate nullability.

key

map

class

permacrud

If you specified open-ils.pcrud in the controller, you need to have a section for permacrud. If you did not specify open-ils.pcrud in the controller, do not include this section.

This section specifies whether users should have the ability to create, update, delete, or only retrieve data from this class and its associated table (if applicable).

permacrud xmlns

<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">

This should be the opening tag for your peramcrud area.

actions

options

If using the create/update/delete actions, the class must also be mapped to an oils_persist:tablename.

context_field
field
global_required
owning_user