[limb-svn] r6847 - 3.x/trunk/limb/active_record/src
svn at limb-project.com
svn at limb-project.com
Fri Mar 21 13:41:38 MSK 2008
Author: svk
Date: 2008-03-21 13:41:38 +0300 (Fri, 21 Mar 2008)
New Revision: 6847
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6847
Modified:
3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
Log:
-- correct identifiers quoting
Modified: 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
===================================================================
--- 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-03-21 10:37:09 UTC (rev 6846)
+++ 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-03-21 10:41:38 UTC (rev 6847)
@@ -845,7 +845,7 @@
protected function _loadBelongsToObject($property)
{
return self :: findFirst($this->_belongs_to[$property]['class'],
- array('criteria' => $this->_belongs_to[$property]['field'] . ' = ' . (int)$this->getId()),
+ array('criteria' => $this->_db_conn->quoteIdentifier($this->_belongs_to[$property]['field']) . ' = ' . (int)$this->getId()),
$this->_db_conn);
}
@@ -1364,7 +1364,7 @@
protected function _findById($id, $throw_exception)
{
if($object = self :: find(get_class($this),
- array('first', 'criteria' => $this->_primary_key_name . '=' . (int)$id),
+ array('first', 'criteria' => $this->_db_conn->quoteIdentifier($this->_primary_key_name) . '=' . (int)$id),
$this->_db_conn))
return $object;
elseif($throw_exception)
@@ -1605,7 +1605,7 @@
function addClassCriteria($criteria)
{
if($this->_isInheritable())
- return lmbSQLCriteria :: objectify($criteria)->addAnd(array(self :: $_inheritance_field .
+ return lmbSQLCriteria :: objectify($criteria)->addAnd(array($this->_db_conn->quoteIdentifier(self :: $_inheritance_field) .
$this->getInheritanceCondition()));
return $criteria;
More information about the limb-svn
mailing list