Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
Model Consistency Checking
Programmer's Guide > OpenAccess ORM Classic (Old API) > Programming With OpenAccess > Mapping > Map and Collection Fields > Model Consistency Checking

Glossary Item Box

This documentation article is a legacy resource describing the functionality of the deprecated OpenAccess Classic only. The contemporary documentation of Telerik OpenAccess ORM is available here.

It is important that one-to-many and many-to-many relationships are consistent in your model. If one side of the relationship is out of sync with the other side then either the database will not be updated properly or stale data will be left in the 2nd level cache. If you are using managed relationships then this is usually taken care of by OpenAccess. If you are using unmanaged relationships then you must handle this in your code.

OpenAccess ORM has support for automatically checking the consistency of all of the objects in the object scope (local) cache on commit. This is not enabled by default as the check is expensive. It may even have to load new instances from the database or from the 2nd level cache. However, you should enable this during development and testing.