EnkiHighCardinalityAssociation

From LucidDB Wiki
Jump to: navigation, search

Associations are stored in Enki/Hibernate as objects. Each type of association contains references to metamodel objects, which are stored as a type specifier and MOF ID. Hibernate treats these values as simple strings and integers which prevents it from pre-loading objects too enthusiastically. Hibernate does, however, lazily load the association objects when objects that reference them are loaded. By default, when a 1-to-many association object is loaded, all of its many-end references (but not the referenced objects) are loaded at once, via a join. For associations where the number of many-end references is expected to be very large, and especially if the referenced objects are infrequently used, it is more efficient to load the references via deferred select statements.

Tag

The tag "org.eigenbase.enki.highCardinalityAssociation" controls whether to enable high cardinality loading semantics for 1-to-many associations. Valid values are "true" (to enable high cardinality mode) or "false" (the default if the tag is not specified).

Future Enhancements

It is possible to implement similar behavior for many-to-many associations.

Product Documentation