diff options
| author | wei <> | 2006-07-26 01:44:57 +0000 | 
|---|---|---|
| committer | wei <> | 2006-07-26 01:44:57 +0000 | 
| commit | 5c1132f6da292a689bc52bd7f20a83ff8d733fbd (patch) | |
| tree | 3b61f33aff5aac63bc192564602c2ff482913cf5 /framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php | |
| parent | cbb7a11179b9c1c46e35f04d07d6386a44e400b2 (diff) | |
Allow nested GroupBy result maps
Diffstat (limited to 'framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php')
| -rw-r--r-- | framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php index e4f5c1fa..dbd4d6e7 100644 --- a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php +++ b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php @@ -96,13 +96,17 @@ class TPropertyAccess  		return true;
  	}
 -	public static function set($object, $path, $value)
 +	public static function set(&$object, $path, $value)
  	{
  		$properties = explode('.', $path);
  		$prop = array_pop($properties);
  		if(count($properties) > 0)
  			$object = self::get($object, implode('.',$properties));
 -		if(is_object($object))
 +		if(is_array($object) || $object instanceof ArrayAccess)
 +		{
 +			$object[$prop] = $value;
 +		}
 +		else if(is_object($object))
  		{
  			$setter = 'set'.$prop;
  			if(is_callable(array($object, $setter)))
  | 
