newdevs:db:fm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newdevs:db:fm [2023/05/22 10:26] – [links] tlittle | newdevs:db:fm [2025/07/29 11:26] (current) – [reltype] smayo | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== The Fieldmapper ====== | ====== 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 ('' |
* [[https:// | * [[https:// | ||
Line 14: | Line 14: | ||
* < | * < | ||
+ | Outline of fieldmapper classes: | ||
- | ===== Things to Add to This Page: ===== | + | * [[evergreen-user:reporting_data_dictionary|Reporting data dictionary]] |
- | * Information about the main fieldmapper classes | + | |
- | * Example of how to navigate | + | While it was written for the old desktop client, [[xul: |
- | * Relationship of the fieldmapper to reports | + | |
- | * Relationship of the fieldmapper to the PostgreSQL database schemas | + | {{METATOC >: |
===== Parts of the Fieldmapper ===== | ===== Parts of the Fieldmapper ===== | ||
- | ==== Class header ==== | + | ==== class header ==== |
=== class === | === class === | ||
Line 37: | Line 38: | ||
=== oils_obj: | === oils_obj: | ||
+ | |||
+ | === oils_persist: | ||
+ | |||
+ | This is an estimate of how many records are expected in this class. | ||
+ | |||
+ | * low (less than 100 records) | ||
+ | * high (100-1000 records) | ||
+ | * unbounded (more than 1000 records) | ||
=== oils_persist: | === oils_persist: | ||
Line 42: | Line 51: | ||
=== oils_persist: | === oils_persist: | ||
+ | This essentially means that the class or field is not " | ||
+ | |||
+ | < | ||
+ | | ||
+ | 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: | === oils_persist: | ||
Line 51: | Line 65: | ||
=== reporter: | === reporter: | ||
This will be the name of your view in list of available report sources in the reporter, so it should be in readable language. | 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 ==== | ==== fields ==== | ||
Line 62: | Line 77: | ||
=== reporter: | === reporter: | ||
+ | * bool - true/ | ||
+ | * text | ||
+ | * int - a whole number | ||
+ | * float - a decimal number | ||
+ | * link - a reference to a different class. | ||
+ | * id - a whole number. This class' | ||
+ | * money - an amount of money | ||
+ | * org_unit - a library/ | ||
+ | * interval - an amount of time shown as a number followed by a letter for the unit e.g. 20h for 20 hours or 7d for seven days | ||
+ | * timestamp - an unchanging point in time | ||
==== links ==== | ==== links ==== | ||
=== link field === | === link field === | ||
=== reltype === | === reltype === | ||
- | These distinctions are to indicate key directionality. They are not to indicate nullability. | ||
- | | + | There are 3 reltypes: |
- | * has_many | + | |
- | * might_have | + | |
+ | * has_many | ||
+ | |||
+ | * might_have | ||
+ | |||
+ | In other words, " | ||
+ | |||
+ | |||
+ | Here's how to decide which reltype attribute to use: | ||
+ | |||
+ | * If the field is not virtual, but backed by a real column: ALWAYS use " | ||
+ | |||
+ | * If the field is virtual, but there' | ||
+ | |||
+ | * If the field is virtual, and there can be any number of rows on the other end of the join: ALWAYS use " | ||
=== key === | === key === | ||
Line 86: | Line 123: | ||
=== permacrud xmlns === | === permacrud xmlns === | ||
< | < | ||
- | This should be the opening tag for your peramcrud | + | This should be the opening tag for your permacrud |
=== actions === | === actions === | ||
Line 97: | Line 134: | ||
If using the create/ | If using the create/ | ||
+ | |||
+ | If you specify a permission, you must also include a '' | ||
== context_field == | == context_field == | ||
Line 108: | Line 147: | ||
== owning_user == | == owning_user == | ||
+ | |||
+ | ===== Things to Add to This Page: ===== | ||
+ | * Information about the main fieldmapper classes | ||
+ | * Example of how to navigate the fieldmapper | ||
+ | * Relationship of the fieldmapper to reports | ||
+ | * Relationship of the fieldmapper to the PostgreSQL database schemas |
newdevs/db/fm.1684765608.txt.gz · Last modified: 2023/05/22 10:26 by tlittle