common/services/traits/base/ApprovalTrait.php
public function getPageByOwnerId( $ownerId, $config = [] ) {

		$owner		= $config[ 'owner' ] ?? false;
		$modelTable	= $this->getModelTable();

		if( $owner ) {

			$config[ 'conditions' ][ "$modelTable.holderId" ] = $ownerId;
		}
		else {

			$config[ 'conditions' ][ "$modelTable.createdBy" ] = $ownerId;
		}

		return $this->getPage( $config );
	}
public function getPageByOwnerId( $ownerId, $config = [] ) {

		$owner		= $config[ 'owner' ] ?? false;
		$modelTable	= $this->getModelTable();

		if( $owner ) {

			$config[ 'conditions' ][ "$modelTable.holderId" ] = $ownerId;
		}
		else {

			$config[ 'conditions' ][ "$modelTable.createdBy" ] = $ownerId;
		}

		return $this->getPage( $config );
	}
public function getPageByOwnerId ( $ ownerId , $ config = [ ] ) { $ owner = $ config [ 'owner' ] ?? false ; $ modelTable = $ this -> getModelTable ( ) ; if ( $ owner ) { $ config [ 'conditions' ] [ "$modelTable.holderId" ] = $ ownerId ; } else { $ config [ 'conditions' ] [ "$modelTable.createdBy" ] = $ ownerId ; } return $ this -> getPage ( $ config ) ; }
It expects the model to support either of createdBy or ownerId column. If both exist, ownerId will dominate.
It expects the model to support either of createdBy or ownerId column . If both exist ownerId will dominate .