/**
  * @return array
  *
  * @param bool $MCV2only filter for new modelconfig with doctrine schema tool
  */
 public function getModels($MCV2only = false)
 {
     if ($this->_models === null && !empty($this->_applicationName)) {
         $cache = Tinebase_Core::getCache();
         $cacheId = Tinebase_Helper::convertCacheId('getModels' . $this->_applicationName);
         $models = $cache->load($cacheId);
         if (!$models) {
             $models = $this->_getModelsFromAppDir();
             // cache for a long time only on prod
             $cache->save($models, $cacheId, array(), TINE20_BUILDTYPE === 'DEVELOPMENT' ? 1 : 3600);
         }
         $this->_models = $models;
     }
     if ($MCV2only) {
         if (!Setup_Core::isDoctrineAvailable()) {
             if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) {
                 Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' Doctrine not available, could not get modelconfig v2 models for application (php version id: ' . PHP_VERSION_ID . ')');
             }
             return array();
         }
         $md = new Tinebase_Record_DoctrineMappingDriver();
         $MCv2Models = array();
         foreach ((array) $this->_models as $model) {
             if ($md->isTransient($model)) {
                 $MCv2Models[] = $model;
             }
         }
         return $MCv2Models;
     }
     return $this->_models;
 }