diff options
author | Brion Vibber <brion@pobox.com> | 2010-11-01 14:31:32 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-11-01 14:31:32 -0700 |
commit | 62d47011482373b77ac6715d507ab8913b9280fc (patch) | |
tree | 4ba9c74d809cb4262770575a9f8757d069ae4eb5 | |
parent | 692ef9c3309bde60346beb32386ff17157e0a5e2 (diff) |
fix a couple bugs in Managed_DataObject
-rw-r--r-- | classes/Managed_DataObject.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/classes/Managed_DataObject.php b/classes/Managed_DataObject.php index 35d52c512..7990d7f40 100644 --- a/classes/Managed_DataObject.php +++ b/classes/Managed_DataObject.php @@ -68,7 +68,7 @@ abstract class Managed_DataObject extends Memcached_DataObject function sequenceKey() { - $table = self::schemaDef(); + $table = call_user_func(array(get_class($this), 'schemaDef')); foreach ($table['fields'] as $name => $column) { if ($column['type'] == 'serial') { // We have a serial/autoincrement column. @@ -92,8 +92,7 @@ abstract class Managed_DataObject extends Memcached_DataObject function keyTypes() { - $keys = array(); - $table = self::schemaDef(); + $table = call_user_func(array(get_class($this), 'schemaDef')); if (!empty($table['unique keys'])) { foreach ($table['unique keys'] as $idx => $fields) { |