示例#1
0
 public function testSetRelationMapComposite()
 {
     $table = ReaderFavoritePeer::getTableMap();
     $join = new ModelJoin();
     $join->setTableMap($table);
     $join->setRelationMap($table->getRelation('BookOpinion'));
     $this->assertEquals(array(ReaderFavoritePeer::BOOK_ID, ReaderFavoritePeer::READER_ID), $join->getLeftColumns(), 'setRelationMap() automatically sets the left columns for composite relationships');
     $this->assertEquals(array(BookOpinionPeer::BOOK_ID, BookOpinionPeer::READER_ID), $join->getRightColumns(), 'setRelationMap() automatically sets the right columns for composite relationships');
 }