10. A system for reference partitioning database objects by values in a reference field, the system comprising: at least one hardware processor; at least one database environment, the database environment supporting triggers and partitioning; at least one application program; and memory storing: a reference field metadata framework that: identifies classes in a hierarchy of database objects, identifies at least one class as a root of the hierarchy, identifies, for each non-root class, a reference field inheritance function for the class, and identifies, for each parent class-child class pair in the hierarchy, a relation-join query, the relation-join query being a join between tables in the database environment onto which the parent class and child class are persisted, and triggers that use the framework to maintain values for the reference field for non-root database objects, including at least a first trigger invoked after a reference field of a database object in a root class is changed, a second trigger invoked responsive to a non-root database object being inserted, and a third trigger invoked responsive to a non-root database object having a change in parent.
10. A system for reference partitioning database objects by values in a reference field, the system comprising: at least one hardware processor; at least one database environment, the database environment supporting triggers and partitioning; at least one application program; and memory storing: a reference field metadata framework that: identifies classes in a hierarchy of database objects, identifies at least one class as a root of the hierarchy, identifies, for each non-root class, a reference field inheritance function for the class, and identifies, for each parent class-child class pair in the hierarchy, a relation-join query, the relation-join query being a join between tables in the database environment onto which the parent class and child class are persisted, and triggers that use the framework to maintain values for the reference field for non-root database objects, including at least a first trigger invoked after a reference field of a database object in a root class is changed, a second trigger invoked responsive to a non-root database object being inserted, and a third trigger invoked responsive to a non-root database object having a change in parent. 11. The system of claim 10 , wherein the first trigger uses the reference field metadata framework to: traverse the hierarchy from the database object in the root class downwards, avoiding cycles; and set a value for the reference field of each child database object reached in the traversal according to the reference field inheritance function for a class of the child database object, wherein the child database object is assigned to a partition according to its value for the reference field.