protected function hydrateSchemaFromAssoc(array $schema) {
		/** @var \Cake\ORM\AssociationCollection|\Cake\ORM\Association[] $associations */
		$associations = $this->getConfig('associations');

		foreach ($associations as $association) {
			try {
				$entityClass = '\\' . ltrim($association->getTarget()->getEntityClass(), '\\');

				if ($entityClass === '\Cake\ORM\Entity') {
					$namespace = Configure::read('App.namespace');

					list($plugin) = pluginSplit($association->getTarget()->getRegistryAlias());
					if ($plugin !== null) {
						$namespace = $plugin;
					}
					$namespace = str_replace('/', '\\', trim($namespace, '\\'));

					$entityClass = $this->_entityName($association->getTarget()->getAlias());
					$entityClass = '\\' . $namespace . '\Model\Entity\\' . $entityClass;

					if (!class_exists($entityClass)) {
						$entityClass = '\Cake\ORM\Entity';
					}
				}

				$schema[$association->getProperty()] = [
					'kind' => 'association',
					'association' => $association,
					'type' => $entityClass
				];
			} catch (Exception $exception) {
				continue;
			}
		}

		return $schema;
	}
protected function hydrateSchemaFromAssoc(array $schema) {
		/** @var \Cake\ORM\AssociationCollection|\Cake\ORM\Association[] $associations */
		$associations = $this->getConfig('associations');

		foreach ($associations as $association) {
			try {
				$entityClass = '\\' . ltrim($association->getTarget()->getEntityClass(), '\\');

				if ($entityClass === '\Cake\ORM\Entity') {
					$namespace = Configure::read('App.namespace');

					list($plugin) = pluginSplit($association->getTarget()->getRegistryAlias());
					if ($plugin !== null) {
						$namespace = $plugin;
					}
					$namespace = str_replace('/', '\\', trim($namespace, '\\'));

					$entityClass = $this->_entityName($association->getTarget()->getAlias());
					$entityClass = '\\' . $namespace . '\Model\Entity\\' . $entityClass;

					if (!class_exists($entityClass)) {
						$entityClass = '\Cake\ORM\Entity';
					}
				}

				$schema[$association->getProperty()] = [
					'kind' => 'association',
					'association' => $association,
					'type' => $entityClass
				];
			} catch (Exception $exception) {
				continue;
			}
		}

		return $schema;
	}
protected function hydrateSchemaFromAssoc ( array $ schema ) { /** @var \Cake\ORM\AssociationCollection|\Cake\ORM\Association[] $associations */ $ associations = $ this -> getConfig ( 'associations' ) ; foreach ( $ associations as $ association ) { try { $ entityClass = '\\' . ltrim ( $ association -> getTarget ( ) -> getEntityClass ( ) , '\\' ) ; if ( $ entityClass === '\Cake\ORM\Entity' ) { $ namespace = Configure :: read ( 'App.namespace' ) ; list ( $ plugin ) = pluginSplit ( $ association -> getTarget ( ) -> getRegistryAlias ( ) ) ; if ( $ plugin !== null ) { $ namespace = $ plugin ; } $ namespace = str_replace ( '/' , '\\' , trim ( $ namespace , '\\' ) ) ; $ entityClass = $ this -> _entityName ( $ association -> getTarget ( ) -> getAlias ( ) ) ; $ entityClass = '\\' . $ namespace . '\Model\Entity\\' . $ entityClass ; if ( ! class_exists ( $ entityClass ) ) { $ entityClass = '\Cake\ORM\Entity' ; } } $ schema [ $ association -> getProperty ( ) ] = [ 'kind' => 'association' , 'association' => $ association , 'type' => $ entityClass ] ; } catch ( Exception $ exception ) { continue ; } } return $ schema ; }
From Bake Plugin

@param array $schema

@return array
From Bake Plugin