diff --git a/help/export.html b/help/export.html
index 9118e72..0224b6d 100644
--- a/help/export.html
+++ b/help/export.html
@@ -105,7 +105,10 @@ function mymodule_schema() {
 <dd>Objects should contain a primary key which is a database identifier primarily used to determine if an object has been written or not. This is required for the default CRUD save callback to work.</dd>
 
 <dt>object</dt>
-<dd>The class the object should be created as. Defaults as stdClass.</dd>
+<dd>The class the object should be created as. If neither this nor 'object class callback' is set, defaults as stdClass.</dd>
+
+<dt>object class callback</dt>
+<dd>Function used to get the name of the class the object should be created as. The function receives the loaded object as a parameter. If neither this nor 'object' is set, defaults as stdClass..</dd>
 
 <dt>can disable</dt>
 <dd>Control whether or not the exportable objects can be disabled. All this does is cause the 'disabled' field on the object to always be set appropriately, and a variable is kept to record the state. Changes made to this state must be handled by the owner of the object. Defaults to TRUE.</dd>
diff --git a/includes/export.inc b/includes/export.inc
index fd6797a..0e0fbc0 100644
--- a/includes/export.inc
+++ b/includes/export.inc
@@ -380,7 +380,7 @@ function ctools_export_load_object($table, $type = 'all', $args = array()) {
   $status = variable_get($export['status'], array());
   // Unpack the results of the query onto objects and cache them.
   while ($data = db_fetch_object($result)) {
-    $object = _ctools_export_unpack_object($schema, $data, $export['object']);
+    $object = _ctools_export_unpack_object($schema, $data);
     $object->table = $table;
     $object->type = t('Normal');
     $object->export_type = EXPORT_IN_DATABASE;
@@ -586,13 +586,20 @@ function _ctools_export_get_defaults($table, $export) {
  * @param $data
  *   The data as loaded by db_fetch_object().
  * @param $object
- *   If an object, data will be unpacked onto it. If a string
- *   an object of that type will be created.
+ *   If an object, data will be unpacked onto it.
  */
-function _ctools_export_unpack_object($schema, $data, $object = 'stdClass') {
-  if (is_string($object)) {
-    if (class_exists($object)) {
-      $object = new $object;
+function _ctools_export_unpack_object($schema, $data, $object = NULL) {
+  if (!isset($object)) {
+    if (isset($schema['export']['object class callback'])) {
+      $function = $schema['export']['object class callback'];
+      $class = $function($data);
+    }
+    elseif (isset($schema['export']['object'])) {
+      $class = $schema['export']['object'];
+    }
+
+    if (isset($class) && class_exists($class)) {
+      $object = new $class;
     }
     else {
       $object = new stdClass;
@@ -629,7 +636,7 @@ function _ctools_export_unpack_object($schema, $data, $object = 'stdClass') {
  */
 function ctools_export_unpack_object($table, $data) {
   $schema = ctools_export_get_schema($table);
-  return _ctools_export_unpack_object($schema, $data, $schema['export']['object']);
+  return _ctools_export_unpack_object($schema, $data);
 }
 
 /**
