Skip to content

Commit

Permalink
exclude relations with limit/offset
Browse files Browse the repository at this point in the history
exclude them until we have a well defined behavior to handle them
  • Loading branch information
cebe committed May 1, 2012
1 parent 7cd1d9e commit d2d81fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions EActiveRecordRelationBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ public function afterSave($event)
protected function isRelationSupported($relation)
{
// @todo not sure about 'together', also check for joinType
// @todo not sure what to do if limit/offset is set
return !isset($relation['on']) &&
!isset($relation['through']) &&
!isset($relation['condition']) &&
!isset($relation['group']) &&
!isset($relation['join']) &&
!isset($relation['having']) &&
!isset($relation['limit']) && // @todo not sure what to do if limit/offset is set
!isset($relation['offset']) &&
!isset($relation['scopes']);
}

Expand Down Expand Up @@ -282,7 +283,7 @@ protected function objectsToPrimaryKeys($records)
*/
protected function primaryKeysToObjects($pks, $className)
{
// @todo increase performance by running on query with findAllByPk()
// @todo increase performance by running one query with findAllByPk()
$records=array();
foreach($pks as $pk) {
$record=$pk;
Expand Down

0 comments on commit d2d81fe

Please sign in to comment.