diff --git a/include/class.orm.php b/include/class.orm.php index d1aa0c5386ed981b4f0ebf5d26f804a3d53fd8b4..ef3e2cea4ce1d26b986a70fbe2d3678ab778859c 100644 --- a/include/class.orm.php +++ b/include/class.orm.php @@ -19,7 +19,13 @@ class OrmException extends Exception {} class OrmConfigurationException extends Exception {} // Database fields/tables do not match codebase -class InconsistentModelException extends OrmException {} +class InconsistentModelException extends OrmException { + function __construct() { + // Drop the model cache (just incase) + ModelMeta::flushModelCache(); + call_user_func_array(array('parent', '__construct'), func_get_args()); + } +} /** * Meta information about a model including edges (relationships), table