"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ORM/LazyEagerLoader.php" between
cakephp-3.8.2.tar.gz and cakephp-3.8.3.tar.gz

About: CakePHP is a rapid development framework for PHP applications. Source code.

LazyEagerLoader.php  (cakephp-3.8.2):LazyEagerLoader.php  (cakephp-3.8.3)
skipping to change at line 89 skipping to change at line 89
/** @var \Cake\ORM\Query $query */ /** @var \Cake\ORM\Query $query */
$query = $source $query = $source
->find() ->find()
->select((array)$primaryKey) ->select((array)$primaryKey)
->where(function ($exp, $q) use ($primaryKey, $keys, $source) { ->where(function ($exp, $q) use ($primaryKey, $keys, $source) {
if (is_array($primaryKey) && count($primaryKey) === 1) { if (is_array($primaryKey) && count($primaryKey) === 1) {
$primaryKey = current($primaryKey); $primaryKey = current($primaryKey);
} }
if (is_string($primaryKey)) { if (is_string($primaryKey)) {
/** @var \Cake\Database\Expression\QueryExpression $exp */
return $exp->in($source->aliasField($primaryKey), $keys->toL ist()); return $exp->in($source->aliasField($primaryKey), $keys->toL ist());
} }
/** @var \Cake\ORM\Query $q */
$types = array_intersect_key($q->getDefaultTypes(), array_flip($ primaryKey)); $types = array_intersect_key($q->getDefaultTypes(), array_flip($ primaryKey));
$primaryKey = array_map([$source, 'aliasField'], $primaryKey); $primaryKey = array_map([$source, 'aliasField'], $primaryKey);
return new TupleComparison($primaryKey, $keys->toList(), $types, 'IN'); return new TupleComparison($primaryKey, $keys->toList(), $types, 'IN');
}) })
->enableAutoFields() ->enableAutoFields()
->contain($contain); ->contain($contain);
foreach ($query->getEagerLoader()->attachableAssociations($source) as $l oadable) { foreach ($query->getEagerLoader()->attachableAssociations($source) as $l oadable) {
$config = $loadable->getConfig(); $config = $loadable->getConfig();
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)