Changeset 3536
- Timestamp:
- 01/17/08 13:25:04 (18 months ago)
- Location:
- branches
- Files:
-
- 2 modified
-
0.10/lib/Doctrine/Record.php (modified) (3 diffs)
-
0.9/lib/Doctrine/Record.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.10/lib/Doctrine/Record.php
r3434 r3536 1203 1203 $value = null; 1204 1204 } 1205 1205 1206 $a[$column] = $value; 1206 1207 } … … 1213 1214 if ($deep) { 1214 1215 foreach ($this->_references as $key => $relation) { 1215 if ( ! $relation instanceof Doctrine_Null) {1216 if (! $relation instanceof Doctrine_Null) { 1216 1217 $a[$key] = $relation->toArray($deep, $prefixKey); 1217 1218 } … … 1219 1220 } 1220 1221 1221 return array_merge($a, $this->_values); 1222 // [FIX] Prevent mapped Doctrine_Records from being displayed fully 1223 foreach ($this->_values as $key => $value) { 1224 if ($value instanceof Doctrine_Record) { 1225 $a[$key] = $value->toArray($deep, $prefixKey); 1226 } else { 1227 $a[$key] = $value; 1228 } 1229 } 1230 1231 return $a; 1222 1232 } 1223 1233 -
branches/0.9/lib/Doctrine/Record.php
r3515 r3536 1189 1189 $value = null; 1190 1190 } 1191 1191 1192 $a[$column] = $value; 1192 1193 } 1194 1193 1195 if ($this->_table->getIdentifierType() == Doctrine::IDENTIFIER_AUTOINC) { 1194 1196 $i = $this->_table->getIdentifier(); 1195 1197 $a[$i] = $this->getIncremented(); 1196 1198 } 1199 1197 1200 if ($deep) { 1198 1201 foreach ($this->_references as $key => $relation) { 1199 if ( ! $relation instanceof Doctrine_Null) {1202 if (! $relation instanceof Doctrine_Null) { 1200 1203 $a[$key] = $relation->toArray($deep, $prefixKey); 1201 1204 } 1202 1205 } 1203 1206 } 1204 return array_merge($a, $this->_values); 1207 1208 // [FIX] Prevent mapped Doctrine_Records from being displayed fully 1209 foreach ($this->_values as $key => $value) { 1210 if ($value instanceof Doctrine_Record) { 1211 $a[$key] = $value->toArray($deep, $prefixKey); 1212 } else { 1213 $a[$key] = $value; 1214 } 1215 } 1216 1217 return $a; 1205 1218 } 1206 1219