public function testAddExplicitconditionWithOneAlias() { $j = new Join(); $j->setJoinType(Criteria::LEFT_JOIN); $j->addExplicitCondition('book', 'AUTHOR_ID', null, 'author', 'ID', 'a', Join::EQUAL); $params = array(); $this->assertEquals($j->getClause($params), 'LEFT JOIN author a ON (book.AUTHOR_ID=a.ID)'); }
/** * @param Join $join * * @return bool */ public function equals($join) { $parametersOfThisClauses = array(); $parametersOfJoinClauses = array(); return $join !== null && $join instanceof Join && $this->getJoinType() == $join->getJoinType() && $this->getConditions() == $join->getConditions() && $this->getClause($parametersOfThisClauses) == $join->getClause($parametersOfJoinClauses); }