本文整理汇总了PHP中AuthorPeer::getTableMap方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthorPeer::getTableMap方法的具体用法?PHP AuthorPeer::getTableMap怎么用?PHP AuthorPeer::getTableMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthorPeer
的用法示例。
在下文中一共展示了AuthorPeer::getTableMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPhpNameMap
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = AuthorPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
示例2: testUseFkQueryTwiceTwoAliases
public function testUseFkQueryTwiceTwoAliases()
{
$q = BookQuery::create()->useAuthorQuery('a')->filterByFirstName('Leo')->endUse()->useAuthorQuery('b')->filterByLastName('Tolstoi')->endUse();
$join1 = new ModelJoin();
$join1->setJoinType(Criteria::LEFT_JOIN);
$join1->setTableMap(AuthorPeer::getTableMap());
$join1->setRelationMap(BookPeer::getTableMap()->getRelation('Author'), null, 'a');
$join1->setRelationAlias('a');
$join2 = new ModelJoin();
$join2->setJoinType(Criteria::LEFT_JOIN);
$join2->setTableMap(AuthorPeer::getTableMap());
$join2->setRelationMap(BookPeer::getTableMap()->getRelation('Author'), null, 'b');
$join2->setRelationAlias('b');
$q1 = BookQuery::create()->addAlias('a', AuthorPeer::TABLE_NAME)->addJoinObject($join1, 'a')->add('a.FIRST_NAME', 'Leo', Criteria::EQUAL)->addAlias('b', AuthorPeer::TABLE_NAME)->addJoinObject($join2, 'b')->add('b.LAST_NAME', 'Tolstoi', Criteria::EQUAL);
$this->assertTrue($q->equals($q1), 'useFkQuery() called twice on the same relation with two aliases creates two joins');
}