Permalink
Browse files

Data in `\data\Entity` now shows up above related data in calls to `d…

…ata()`.
  • Loading branch information...
1 parent eb5624f commit 6857c6b828027a30cc7d7f415fa00b43f1149e48 @nateabele nateabele committed Mar 2, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 data/Entity.php
View
@@ -120,8 +120,8 @@ class Entity extends \lithium\core\Object {
* @var array
*/
protected $_autoConfig = array(
- 'classes' => 'merge', 'parent', 'schema', 'data', 'model', 'exists', 'pathKey',
- 'relationships'
+ 'classes' => 'merge', 'parent', 'schema', 'data',
+ 'model', 'exists', 'pathKey', 'relationships'
);
/**
@@ -247,7 +247,7 @@ public function data($name = null) {
return $this->__get($name);
}
$related = array_map(function($rel) { return $rel->data(); }, $this->_relationships);
- return $related + $this->_updated + $this->_data;
+ return array_merge($this->_updated + $this->_data, $related);
}
/**

0 comments on commit 6857c6b

Please sign in to comment.