summaryrefslogtreecommitdiff
path: root/framework/DataAccess/SQLMap/DataMapper
diff options
context:
space:
mode:
authorwei <>2006-07-26 01:44:57 +0000
committerwei <>2006-07-26 01:44:57 +0000
commit5c1132f6da292a689bc52bd7f20a83ff8d733fbd (patch)
tree3b61f33aff5aac63bc192564602c2ff482913cf5 /framework/DataAccess/SQLMap/DataMapper
parentcbb7a11179b9c1c46e35f04d07d6386a44e400b2 (diff)
Allow nested GroupBy result maps
Diffstat (limited to 'framework/DataAccess/SQLMap/DataMapper')
-rw-r--r--framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php8
-rw-r--r--framework/DataAccess/SQLMap/DataMapper/messages.txt4
2 files changed, 9 insertions, 3 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)))
diff --git a/framework/DataAccess/SQLMap/DataMapper/messages.txt b/framework/DataAccess/SQLMap/DataMapper/messages.txt
index 16be9c2b..47bb06e7 100644
--- a/framework/DataAccess/SQLMap/DataMapper/messages.txt
+++ b/framework/DataAccess/SQLMap/DataMapper/messages.txt
@@ -62,4 +62,6 @@ sqlmap_unable_to_find_resource = 'Unable to find SQLMap configuration file '{0
sqlmap_query_execution_error = Error in executing SQLMap statement '{0}' : '{1}'.
sqlmap_undefined_discriminator = The discriminator is null, but somehow a subMap was reached in ResultMap '{0}' in file '{1}'.
sqlmap_invalid_delegate = Invalid callback row delegate '{1}' in mapped statement '{0}'.
-sqlmap_invalid_prado_cache = Unable to find Prado cache module for SQLMap cache '{0}'. \ No newline at end of file
+sqlmap_invalid_prado_cache = Unable to find Prado cache module for SQLMap cache '{0}'.
+
+sqlmap_non_groupby_array_list_type = Expecting GroupBy property in result map '{0}' since {1}::{2} is an array or TList type. \ No newline at end of file