diff --git a/lib/Drupal/ctools/DatabaseExportableController.php b/lib/Drupal/ctools/DatabaseExportableController.php
index fa26cfc..bb22f21 100644
--- a/lib/Drupal/ctools/DatabaseExportableController.php
+++ b/lib/Drupal/ctools/DatabaseExportableController.php
@@ -317,6 +317,22 @@ class DatabaseExportableController extends ExportableControllerBase {
    * @todo.
    */
   public function save($exportable) {
+    // Objects should have a serial primary key. If not, simply fail to write.
+    if (empty($this->schema['primary key'])) {
+      return FALSE;
+    }
+
+    if ($exportable->isInDatabase()) {
+      // Existing record.
+      $update = $this->schema['primary key'];
+    }
+    else {
+      // New record.
+      $update = array();
+      $exportable->setIsInDatabase(TRUE);
+    }
+
+    return drupal_write_record($this->info['schema'], $exportable, $update);
   }
 
   /**
