Changeset 5095
- Timestamp:
- 10/15/08 21:45:14 (9 months ago)
- Location:
- branches
- Files:
-
- 4 modified
-
1.0/lib/Doctrine/Query.php (modified) (5 diffs)
-
1.0/lib/Doctrine/Relation.php (modified) (2 diffs)
-
1.1/lib/Doctrine/Query.php (modified) (5 diffs)
-
1.1/lib/Doctrine/Relation.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/lib/Doctrine/Query.php
r5066 r5095 1580 1580 . $localTable->getColumnName($localTable->getIdentifier())) // what about composite keys? 1581 1581 . ' = ' 1582 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocal ());1582 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocalColumnName()); 1583 1583 1584 1584 if ($relation->isEqual()) { … … 1589 1589 . $table->getColumnName($table->getIdentifier())) 1590 1590 . ' = ' 1591 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeign ());1591 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeignColumnName()); 1592 1592 } 1593 1593 … … 1634 1634 if ( ! $overrideJoin) { 1635 1635 $queryPart .= ' ON ' 1636 . $this->_conn->quoteIdentifier($localAlias . '.' . $relation->getLocal ())1636 . $this->_conn->quoteIdentifier($localAlias . '.' . $relation->getLocalColumnName()) 1637 1637 . ' = ' 1638 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $relation->getForeign ());1638 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $relation->getForeignColumnName()); 1639 1639 } 1640 1640 … … 1684 1684 $queryPart .= $this->_conn->quoteIdentifier($foreignAlias . '.' . $localIdentifier) 1685 1685 . ' = ' 1686 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeign ());1686 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeignColumnName()); 1687 1687 1688 1688 if ($relation->isEqual()) { … … 1690 1690 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $localIdentifier) 1691 1691 . ' = ' 1692 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocal ())1692 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocalColumnName()) 1693 1693 . ') AND ' 1694 1694 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $localIdentifier) -
branches/1.0/lib/Doctrine/Relation.php
r4890 r5095 274 274 275 275 /** 276 * getLocalColumnName 277 * returns the column name of the local column 278 * 279 * @return string $columnName 280 */ 281 final public function getLocalColumnName() 282 { 283 return $this->definition['localTable']->getColumnName($this->definition['local']); 284 } 285 286 /** 276 287 * getForeign 277 288 * returns the name of the foreignkey column where … … 287 298 /** 288 299 * getLocalFieldName 289 * returns the field name of the localcolumn300 * returns the field name of the foreign column 290 301 */ 291 302 final public function getForeignFieldName() 292 303 { 293 304 return $this->definition['table']->getFieldName($this->definition['foreign']); 305 } 306 307 /** 308 * getForeignColumnName 309 * returns the column name of the foreign column 310 * 311 * @return string $columnName 312 */ 313 final public function getForeignColumnName() 314 { 315 return $this->definition['table']->getColumnName($this->definition['foreign']); 294 316 } 295 317 -
branches/1.1/lib/Doctrine/Query.php
r5073 r5095 1636 1636 . $localTable->getColumnName($localTable->getIdentifier())) // what about composite keys? 1637 1637 . ' = ' 1638 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocal ());1638 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocalColumnName()); 1639 1639 1640 1640 if ($relation->isEqual()) { … … 1645 1645 . $table->getColumnName($table->getIdentifier())) 1646 1646 . ' = ' 1647 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeign ());1647 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeignColumnName()); 1648 1648 } 1649 1649 … … 1690 1690 if ( ! $overrideJoin) { 1691 1691 $queryPart .= ' ON ' 1692 . $this->_conn->quoteIdentifier($localAlias . '.' . $relation->getLocal ())1692 . $this->_conn->quoteIdentifier($localAlias . '.' . $relation->getLocalColumnName()) 1693 1693 . ' = ' 1694 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $relation->getForeign ());1694 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $relation->getForeignColumnName()); 1695 1695 } 1696 1696 … … 1744 1744 $queryPart .= $this->_conn->quoteIdentifier($foreignAlias . '.' . $localIdentifier) 1745 1745 . ' = ' 1746 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeign ());1746 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeignColumnName()); 1747 1747 1748 1748 if ($relation->isEqual()) { … … 1750 1750 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $localIdentifier) 1751 1751 . ' = ' 1752 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocal ())1752 . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocalColumnName()) 1753 1753 . ') AND ' 1754 1754 . $this->_conn->quoteIdentifier($foreignAlias . '.' . $localIdentifier) -
branches/1.1/lib/Doctrine/Relation.php
r4890 r5095 274 274 275 275 /** 276 * getLocalColumnName 277 * returns the column name of the local column 278 * 279 * @return string $columnName 280 */ 281 final public function getLocalColumnName() 282 { 283 return $this->definition['localTable']->getColumnName($this->definition['local']); 284 } 285 286 /** 276 287 * getForeign 277 288 * returns the name of the foreignkey column where … … 287 298 /** 288 299 * getLocalFieldName 289 * returns the field name of the localcolumn300 * returns the field name of the foreign column 290 301 */ 291 302 final public function getForeignFieldName() 292 303 { 293 304 return $this->definition['table']->getFieldName($this->definition['foreign']); 305 } 306 307 /** 308 * getForeignColumnName 309 * returns the column name of the foreign column 310 * 311 * @return string $columnName 312 */ 313 final public function getForeignColumnName() 314 { 315 return $this->definition['table']->getColumnName($this->definition['foreign']); 294 316 } 295 317