[limb-svn] r6808 - 3.x/trunk/limb/active_record/src
svn at limb-project.com
svn at limb-project.com
Wed Feb 27 14:43:56 MSK 2008
Author: serega
Date: 2008-02-27 14:43:56 +0300 (Wed, 27 Feb 2008)
New Revision: 6808
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6808
Modified:
3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
Log:
-- passing current db connection to custom relation object in lmbActiveRecord
Modified: 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
===================================================================
--- 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-02-27 11:43:10 UTC (rev 6807)
+++ 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-02-27 11:43:56 UTC (rev 6808)
@@ -661,7 +661,7 @@
$info = $this->getRelationInfo($relation);
if(isset($info['collection']))
- return new $info['collection']($relation, $this, $criteria);
+ return new $info['collection']($relation, $this, $criteria, $this->_db_conn);
elseif($this->_hasOneToManyRelation($relation))
return new lmbAROneToManyCollection($relation, $this, $criteria, $this->_db_conn);
else if($this->_hasManyToManyRelation($relation))
@@ -1407,7 +1407,7 @@
return new lmbCollection();
else
{
- $params['criteria'] = new lmbSQLFieldCriteria($this->_primary_key_name, $ids, lmbSQLFieldCriteria :: IN);
+ $params['criteria'] = new lmbSQLFieldCriteria($this->_db_table_name .'.'.$this->_primary_key_name, $ids, lmbSQLFieldCriteria :: IN);
return self :: find(get_class($this), $params, $this->_db_conn);
}
}
More information about the limb-svn
mailing list