protected function build_eager_load_map( $models ) {

		$map = array();

		$foreign = $this->foreign_key;

		foreach ( $models as $model ) {
			$pk = $model->get_raw_attribute( $foreign );

			if ( $pk instanceof Model ) {
				$pk = $pk->get_pk();
			}

			$map[ $pk ][ $model->get_pk() ] = $model;
		}

		return $map;
	}