diff --git a/core/includes/common.inc b/core/includes/common.inc
index b3dc9cb..bd62ba5 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -649,7 +649,7 @@ function drupal_encode_path($path) {
  * user/login and override the default redirection so that the user is
  * redirected to a specific path after logging in:
  * @code
- *   $query = array('destination' => "node/$node->nid");
+ *   $query = array('destination' => 'node/' . $node->nid->value);
  *   $link = l(t('Log in'), 'user/login', array('query' => $query));
  * @endcode
  *
diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index 75c3386..789c33b 100644
--- a/core/includes/entity.inc
+++ b/core/includes/entity.inc
@@ -77,6 +77,9 @@ function entity_get_info($entity_type = NULL) {
         // Drupal\Core\Entity\DatabaseStorageControllerInterface::buildQuery().
         if (isset($entity_info[$name]['base table'])) {
           $entity_info[$name]['schema_fields_sql']['base table'] = drupal_schema_fields_sql($entity_info[$name]['base table']);
+          if (isset($entity_info[$name]['data table'])) {
+            $entity_info[$name]['schema_fields_sql']['data table'] = drupal_schema_fields_sql($entity_info[$name]['data table']);
+          }
           if (isset($entity_info[$name]['revision table'])) {
             $entity_info[$name]['schema_fields_sql']['revision table'] = drupal_schema_fields_sql($entity_info[$name]['revision table']);
           }
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 5d6b32e..84d8c0f 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -4689,7 +4689,7 @@ function _form_set_class(&$element, $class = array()) {
  *
  *   $nodes = entity_load_multiple_by_properties('node', array('uid' => $uid, 'type' => $type));
  *   $node = reset($nodes);
- *   $context['results'][] = $node->nid . ' : ' . check_plain($node->label());
+ *   $context['results'][] = $node->nid->value . ' : ' . check_plain($node->label());
  *   $context['message'] = check_plain($node->label());
  * }
  *
@@ -4709,9 +4709,9 @@ function _form_set_class(&$element, $class = array()) {
  *     ->execute();
  *   foreach ($result as $row) {
  *     $node = node_load($row->nid, TRUE);
- *     $context['results'][] = $node->nid . ' : ' . check_plain($node->label());
+ *     $context['results'][] = $node->nid->value . ' : ' . check_plain($node->label());
  *     $context['sandbox']['progress']++;
- *     $context['sandbox']['current_node'] = $node->nid;
+ *     $context['sandbox']['current_node'] = $node->nid->value;
  *     $context['message'] = check_plain($node->label());
  *   }
  *   if ($context['sandbox']['progress'] != $context['sandbox']['max']) {
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 70113b0..0db518a 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -923,7 +923,7 @@ function _menu_link_translate(&$item, $translate = FALSE) {
  * "story" content type:
  * @code
  * $node = menu_get_object();
- * $story = $node->type == 'story';
+ * $story = $node->type->value == 'story';
  * @endcode
  *
  * @param $type
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 20c43ea..8dffc6e 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2496,7 +2496,7 @@ function template_preprocess_html(&$variables) {
 
   // If on an individual node page, add the node type to body classes.
   if ($node = menu_get_object()) {
-    $variables['attributes']['class'][] = drupal_html_class('node-type-' . $node->type);
+    $variables['attributes']['class'][] = drupal_html_class('node-type-' . $node->type->value);
   }
 
   // Initializes attributes which are specific to the html and body elements.
diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
index 1fa59ec..30cfade 100644
--- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
+++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
@@ -89,6 +89,13 @@ class DatabaseStorageController implements EntityStorageControllerInterface {
   protected $revisionKey;
 
   /**
+   * The table that stores properties, if the entity has multilingual support.
+   *
+   * @var string
+   */
+  protected $dataTable;
+
+  /**
    * The table that stores revisions, if the entity supports revisions.
    *
    * @var string
@@ -124,6 +131,11 @@ public function __construct($entityType) {
       $this->uuidKey = FALSE;
     }
 
+    // Check if the entity type  has multilingual support.
+    if (!empty($this->entityInfo['data table'])) {
+      $this->dataTable = $this->entityInfo['revision table'];
+    }
+
     // Check if the entity type supports revisions.
     if (!empty($this->entityInfo['entity keys']['revision'])) {
       $this->revisionKey = $this->entityInfo['entity keys']['revision'];
@@ -307,6 +319,15 @@ protected function buildQuery($ids, $revision_id = FALSE) {
       $query->join($this->revisionTable, 'revision', "revision.{$this->revisionKey} = base.{$this->revisionKey}");
     }
 
+    if (!empty($this->dataTable)) {
+      if ($this->revisionKey) {
+        $query->join($this->dataTable, 'data', "data.{$this->idKey} = base.{$this->idKey} AND data.{$this->revisionKey} = revision.{$this->revisionKey}");
+      }
+      else {
+        $query->join($this->dataTable, 'data', "data.{$this->idKey} = base.{$this->idKey}");
+      }
+    }
+
     // Add fields from the {entity} table.
     $entity_fields = $this->entityInfo['schema_fields_sql']['base table'];
 
diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php
index 007d6d3..6969158 100644
--- a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php
+++ b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php
@@ -149,7 +149,14 @@ protected function mapFromStorageRecords(array $records) {
       $entity->setCompatibilityMode(TRUE);
 
       foreach ($record as $name => $value) {
-        $entity->{$name}[LANGUAGE_DEFAULT][0]['value'] = $value;
+        if (!isset($entity->{$name}) || is_array($entity->{$name})) {
+          $entity->{$name}[LANGUAGE_DEFAULT][0]['value'] = $value;
+        }
+        else {
+          // Ensure special properies like $isDefaultRevision are set properly.
+          $entity->{$name} = $value;
+        }
+
       }
       $records[$id] = $entity;
     }
@@ -230,12 +237,25 @@ protected function invokeHook($hook, EntityInterface $entity) {
   }
 
   /**
-   * Maps from an entity object to the storage record of the base table.
+   * Maps from an entity object to the storage record of the storage tables.
    */
   protected function mapToStorageRecord(EntityInterface $entity) {
     $record = new \stdClass();
-    foreach ($this->entityInfo['schema_fields_sql']['base table'] as $name) {
+    $rows = $this->entityInfo['schema_fields_sql']['base table'];
+    if ($this->dataTable) {
+      $rows += $this->entityInfo['schema_fields_sql']['data table'];
+    }
+    foreach ($rows as $name) {
       $record->$name = $entity->$name->value;
+      switch ($entity->$name->get('value')->getType()) {
+        // Store dates using timestamps.
+        case 'date':
+          $record->$name = $entity->$name->value->getTimestamp();
+          break;
+        default:
+          $record->$name = $entity->$name->value;
+          break;
+      }
     }
     return $record;
   }
diff --git a/core/lib/Drupal/Core/Entity/EntityNG.php b/core/lib/Drupal/Core/Entity/EntityNG.php
index 1dc938a..c1f74a8 100644
--- a/core/lib/Drupal/Core/Entity/EntityNG.php
+++ b/core/lib/Drupal/Core/Entity/EntityNG.php
@@ -292,11 +292,11 @@ public function translations() {
    * @see EntityNG::compatibilityMode
    */
   public function setCompatibilityMode($enabled) {
-    $this->compatibilityMode = (bool) $enabled;
-    if ($enabled) {
+    if (!$this->compatibilityMode && $enabled) {
       $this->updateOriginalValues();
       $this->fields = array();
     }
+    $this->compatibilityMode = (bool) $enabled;
   }
 
   /**
diff --git a/core/modules/book/book.admin.inc b/core/modules/book/book.admin.inc
index 5c414e0..eb3b589 100644
--- a/core/modules/book/book.admin.inc
+++ b/core/modules/book/book.admin.inc
@@ -149,10 +149,10 @@ function book_admin_edit_submit($form, &$form_state) {
         $node->title = $values['title'];
         $node->book['link_title'] = $values['title'];
         $node->revision = 1;
-        $node->log = t('Title changed from %original to %current.', array('%original' => $node->title, '%current' => $values['title']));
+        $node->log = t('Title changed from %original to %current.', array('%original' => $node->title->value, '%current' => $values['title']));
 
         $node->save();
-        watchdog('content', 'book: updated %title.', array('%title' => $node->label()), WATCHDOG_NOTICE, l(t('view'), 'node/' . $node->nid));
+        watchdog('content', 'book: updated %title.', array('%title' => $node->label()), WATCHDOG_NOTICE, l(t('view'), 'node/' . $node->nid->value));
       }
     }
   }
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index fd4fac9..be51055 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -100,7 +100,7 @@ function book_node_view_link(Node $node, $view_mode) {
   if (isset($node->book['depth'])) {
     if ($view_mode == 'full' && node_is_page($node)) {
       $child_type = config('book.settings')->get('child_type');
-      if ((user_access('add content to books') || user_access('administer book outlines')) && node_access('create', $child_type) && $node->status == 1 && $node->book['depth'] < MENU_MAX_DEPTH) {
+      if ((user_access('add content to books') || user_access('administer book outlines')) && node_access('create', $child_type) && $node->status->value == 1 && $node->book['depth'] < MENU_MAX_DEPTH) {
         $links['book_add_child'] = array(
           'title' => t('Add child page'),
           'href' => 'node/add/' . $child_type,
@@ -111,7 +111,7 @@ function book_node_view_link(Node $node, $view_mode) {
       if (user_access('access printer-friendly version')) {
         $links['book_printer'] = array(
           'title' => t('Printer-friendly version'),
-          'href' => 'book/export/html/' . $node->nid,
+          'href' => 'book/export/html/' . $node->nid->value,
           'attributes' => array('title' => t('Show a printer-friendly version of this book page and its sub-pages.'))
         );
       }
@@ -232,7 +232,7 @@ function _book_outline_remove_access(Node $node) {
  * is not a top-level page or is a top-level page with no children.
  */
 function _book_node_is_removable($node) {
-  return (!empty($node->book['bid']) && (($node->book['bid'] != $node->nid) || !$node->book['has_children']));
+  return (!empty($node->book['bid']) && (($node->book['bid'] != $node->nid->value) || !$node->book['has_children']));
 }
 
 /**
@@ -427,7 +427,7 @@ function book_form_node_form_alter(&$form, &$form_state, $form_id) {
   $node = $form_state['controller']->getEntity($form_state);
   $access = user_access('administer book outlines');
   if (!$access) {
-    if (user_access('add content to books') && ((!empty($node->book['mlid']) && !empty($node->nid)) || book_type_is_allowed($node->type))) {
+    if (user_access('add content to books') && ((!empty($node->book['mlid']) && !empty($node->nid->value)) || book_type_is_allowed($node->type->value))) {
       // Already in the book hierarchy, or this node type is allowed.
       $access = TRUE;
     }
@@ -568,11 +568,11 @@ function _book_add_form_elements(&$form, &$form_state, Node $node) {
     '#description' => t('Pages at a given level are ordered first by weight and then by title.'),
   );
   $options = array();
-  $nid = isset($node->nid) ? $node->nid : 'new';
+  $nid = isset($node->nid->value) ? $node->nid->value : 'new';
 
-  if (isset($node->nid) && ($nid == $node->book['original_bid']) && ($node->book['parent_depth_limit'] == 0)) {
+  if (isset($node->nid->value) && ($nid == $node->book['original_bid']) && ($node->book['parent_depth_limit'] == 0)) {
     // This is the top level node in a maximum depth book and thus cannot be moved.
-    $options[$node->nid] = $node->label();
+    $options[$node->nid->value] = $node->label();
   }
   else {
     foreach (book_get_books() as $book) {
@@ -640,13 +640,13 @@ function _book_update_outline(Node $node) {
   }
   $new = empty($node->book['mlid']);
 
-  $node->book['link_path'] = 'node/' . $node->nid;
+  $node->book['link_path'] = 'node/' . $node->nid->value;
   $node->book['link_title'] = $node->label();
   $node->book['parent_mismatch'] = FALSE; // The normal case.
 
-  if ($node->book['bid'] == $node->nid) {
+  if ($node->book['bid'] == $node->nid->value) {
     $node->book['plid'] = 0;
-    $node->book['menu_name'] = book_menu_name($node->nid);
+    $node->book['menu_name'] = book_menu_name($node->nid->value);
   }
   else {
     // Check in case the parent is not is this book; the book takes precedence.
@@ -668,7 +668,7 @@ function _book_update_outline(Node $node) {
       // Insert new.
       db_insert('book')
         ->fields(array(
-          'nid' => $node->nid,
+          'nid' => $node->nid->value,
           'mlid' => $node->book['mlid'],
           'bid' => $node->book['bid'],
         ))
@@ -678,7 +678,7 @@ function _book_update_outline(Node $node) {
     }
     else {
       if ($node->book['bid'] != db_query("SELECT bid FROM {book} WHERE nid = :nid", array(
-          ':nid' => $node->nid,
+          ':nid' => $node->nid->value,
         ))->fetchField()) {
         // Update the bid for this page and all children.
         book_update_bid($node->book);
@@ -930,7 +930,7 @@ function book_node_presave(Node $node) {
     $node->revision = 1;
   }
   // Make sure a new node gets a new menu link.
-  if (empty($node->nid)) {
+  if (empty($node->nid->value)) {
     $node->book['mlid'] = NULL;
   }
 }
@@ -942,9 +942,9 @@ function book_node_insert(Node $node) {
   if (!empty($node->book['bid'])) {
     if ($node->book['bid'] == 'new') {
       // New nodes that are their own book.
-      $node->book['bid'] = $node->nid;
+      $node->book['bid'] = $node->nid->value;
     }
-    $node->book['nid'] = $node->nid;
+    $node->book['nid'] = $node->nid->value;
     $node->book['menu_name'] = book_menu_name($node->book['bid']);
     _book_update_outline($node);
   }
@@ -957,9 +957,9 @@ function book_node_update(Node $node) {
   if (!empty($node->book['bid'])) {
     if ($node->book['bid'] == 'new') {
       // New nodes that are their own book.
-      $node->book['bid'] = $node->nid;
+      $node->book['bid'] = $node->nid->value;
     }
-    $node->book['nid'] = $node->nid;
+    $node->book['nid'] = $node->nid->value;
     $node->book['menu_name'] = book_menu_name($node->book['bid']);
     _book_update_outline($node);
   }
@@ -970,14 +970,14 @@ function book_node_update(Node $node) {
  */
 function book_node_predelete(Node $node) {
   if (!empty($node->book['bid'])) {
-    if ($node->nid == $node->book['bid']) {
+    if ($node->nid->value == $node->book['bid']) {
       // Handle deletion of a top-level post.
       $result = db_query("SELECT b.nid FROM {menu_links} ml INNER JOIN {book} b on b.mlid = ml.mlid WHERE ml.plid = :plid", array(
         ':plid' => $node->book['mlid']
       ));
       foreach ($result as $child) {
         $child_node = node_load($child->nid);
-        $child_node->book['bid'] = $child_node->nid;
+        $child_node->book['bid'] = $child_node->nid->value;
         _book_update_outline($child_node);
       }
     }
@@ -997,7 +997,7 @@ function book_node_prepare(Node $node) {
   if (empty($node->book) && (user_access('add content to books') || user_access('administer book outlines'))) {
     $node->book = array();
 
-    if (empty($node->nid) && isset($_GET['parent']) && is_numeric($_GET['parent'])) {
+    if (empty($node->nid->value) && isset($_GET['parent']) && is_numeric($_GET['parent'])) {
       // Handle "Add child page" links:
       $parent = book_link_load($_GET['parent']);
 
@@ -1008,7 +1008,7 @@ function book_node_prepare(Node $node) {
       }
     }
     // Set defaults.
-    $node->book += _book_link_defaults(!empty($node->nid) ? $node->nid : 'new');
+    $node->book += _book_link_defaults(!empty($node->nid->value) ? $node->nid->value : 'new');
   }
   else {
     if (isset($node->book['bid']) && !isset($node->book['original_bid'])) {
diff --git a/core/modules/book/book.pages.inc b/core/modules/book/book.pages.inc
index 90b2192..5c7b8eb 100644
--- a/core/modules/book/book.pages.inc
+++ b/core/modules/book/book.pages.inc
@@ -122,7 +122,7 @@ function book_outline(Node $node) {
 function book_outline_form($form, &$form_state, Node $node) {
   if (!isset($node->book)) {
     // The node is not part of any book yet - set default options.
-    $node->book = _book_link_defaults($node->nid);
+    $node->book = _book_link_defaults($node->nid->value);
   }
   else {
     $node->book['original_bid'] = $node->book['bid'];
@@ -163,7 +163,7 @@ function book_outline_form($form, &$form_state, Node $node) {
  * @see book_outline_form_submit()
  */
 function book_remove_button_submit($form, &$form_state) {
-  $form_state['redirect'] = 'node/' . $form['#node']->nid . '/outline/remove';
+  $form_state['redirect'] = 'node/' . $form['#node']->nid->value . '/outline/remove';
 }
 
 /**
@@ -173,7 +173,7 @@ function book_remove_button_submit($form, &$form_state) {
  */
 function book_outline_form_submit($form, &$form_state) {
   $node = $form['#node'];
-  $form_state['redirect'] = "node/" . $node->nid;
+  $form_state['redirect'] = "node/" . $node->nid->value;
   $book_link = $form_state['values']['book'];
   if (!$book_link['bid']) {
     drupal_set_message(t('No changes were made'));
@@ -187,7 +187,7 @@ function book_outline_form_submit($form, &$form_state) {
     if ($node->book['parent_mismatch']) {
       // This will usually only happen when JS is disabled.
       drupal_set_message(t('The post has been added to the selected book. You may now position it relative to other pages.'));
-      $form_state['redirect'] = "node/" . $node->nid . "/outline";
+      $form_state['redirect'] = "node/" . $node->nid->value . "/outline";
     }
     else {
       drupal_set_message(t('The book outline has been updated.'));
@@ -219,7 +219,7 @@ function book_remove_form($form, &$form_state, Node $node) {
     $description = t('%title may be added to hierarchy again using the Outline tab.', $title);
   }
 
-  return confirm_form($form, t('Are you sure you want to remove %title from the book hierarchy?', $title), 'node/' . $node->nid, $description, t('Remove'));
+  return confirm_form($form, t('Are you sure you want to remove %title from the book hierarchy?', $title), 'node/' . $node->nid->value, $description, t('Remove'));
 }
 
 /**
@@ -230,9 +230,9 @@ function book_remove_form_submit($form, &$form_state) {
   if (_book_node_is_removable($node)) {
     menu_link_delete($node->book['mlid']);
     db_delete('book')
-      ->condition('nid', $node->nid)
+      ->condition('nid', $node->nid->value)
       ->execute();
     drupal_set_message(t('The post has been removed from the book.'));
   }
-  $form_state['redirect'] = 'node/' . $node->nid;
+  $form_state['redirect'] = 'node/' . $node->nid->value;
 }
diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
index a1a88c4..67a65f8 100644
--- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php
+++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
@@ -105,7 +105,7 @@ function testBook() {
     $other_book = $this->createBookNode('new');
     $node = $this->createBookNode($book->nid);
     $edit = array('book[bid]' => $other_book->nid);
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
     $this->drupalLogout();
     $this->drupalLogin($this->web_user);
@@ -138,7 +138,7 @@ function checkBookNode(Node $node, $nodes, $previous = FALSE, $up = FALSE, $next
     // $number does not use drupal_static as it should not be reset
     // since it uniquely identifies each call to checkBookNode().
     static $number = 0;
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
 
     // Check outline structure.
     if ($nodes !== NULL) {
@@ -165,7 +165,7 @@ function checkBookNode(Node $node, $nodes, $previous = FALSE, $up = FALSE, $next
     $expected_breadcrumb = array();
     $expected_breadcrumb[] = url('');
     foreach ($breadcrumb as $a_node) {
-      $expected_breadcrumb[] = url('node/' . $a_node->nid);
+      $expected_breadcrumb[] = url('node/' . $a_node->nid->value);
     }
 
     // Fetch links in the current breadcrumb.
@@ -179,7 +179,7 @@ function checkBookNode(Node $node, $nodes, $previous = FALSE, $up = FALSE, $next
     $this->assertIdentical($expected_breadcrumb, $got_breadcrumb, 'The breadcrumb is correctly displayed on the page.');
 
     // Check printer friendly version.
-    $this->drupalGet('book/export/html/' . $node->nid);
+    $this->drupalGet('book/export/html/' . $node->nid->value);
     $this->assertText($node->label(), 'Printer friendly title found.');
     $this->assertRaw(check_markup($node->body[LANGUAGE_NOT_SPECIFIED][0]['value'], $node->body[LANGUAGE_NOT_SPECIFIED][0]['format']), 'Printer friendly body found.');
 
@@ -194,7 +194,7 @@ function checkBookNode(Node $node, $nodes, $previous = FALSE, $up = FALSE, $next
   function generateOutlinePattern($nodes) {
     $outline = '';
     foreach ($nodes as $node) {
-      $outline .= '(node\/' . $node->nid . ')(.*?)(' . $node->label() . ')(.*?)';
+      $outline .= '(node\/' . $node->nid->value . ')(.*?)(' . $node->label() . ')(.*?)';
     }
 
     return '/<nav id="book-navigation-' . $this->book->nid . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s';
@@ -363,7 +363,7 @@ function testBookDelete() {
 
      // Delete all child book nodes and retest top-level node deletion.
      foreach ($nodes as $node) {
-       $nids[] = $node->nid;
+       $nids[] = $node->nid->value;
      }
      node_delete_multiple($nids);
      $this->drupalPost('node/' . $this->book->nid . '/outline/remove', $edit, t('Remove'));
diff --git a/core/modules/book/templates/book-node-export-html.tpl.php b/core/modules/book/templates/book-node-export-html.tpl.php
index 50c878f..7acdeef 100644
--- a/core/modules/book/templates/book-node-export-html.tpl.php
+++ b/core/modules/book/templates/book-node-export-html.tpl.php
@@ -18,7 +18,7 @@
  * @ingroup themeable
  */
 ?>
-<article id="node-<?php print $node->nid; ?>" class="section-<?php print $depth; ?>">
+<article id="node-<?php print $node->nid->value; ?>" class="section-<?php print $depth; ?>">
   <h1 class="book-heading"><?php print $title; ?></h1>
   <?php print $content; ?>
   <?php print $children; ?>
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 27ff7c3..9826878 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -507,11 +507,11 @@ function comment_permalink($cid) {
   if (($comment = comment_load($cid)) && ($node = node_load($comment->nid))) {
 
     // Find the current display page for this comment.
-    $page = comment_get_display_page($comment->cid, $node->type);
+    $page = comment_get_display_page($comment->cid, $node->type->value);
 
     // @todo: Cleaner sub request handling.
     $request = drupal_container()->get('request');
-    $subrequest = Request::create('/node/' . $node->nid, 'GET', $request->query->all(), $request->cookies->all(), array(), $request->server->all());
+    $subrequest = Request::create('/node/' . $node->nid->value, 'GET', $request->query->all(), $request->cookies->all(), array(), $request->server->all());
     $subrequest->query->set('page', $page);
     // @todo: Convert the pager to use the request object.
     $_GET['page'] = $page;
@@ -564,8 +564,8 @@ function comment_get_recent($number = 10) {
  *   "page=X" if the page number is greater than zero; empty string otherwise.
  */
 function comment_new_page_count($num_comments, $new_replies, Node $node) {
-  $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED);
-  $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50);
+  $mode = variable_get('comment_default_mode_' . $node->type->value, COMMENT_MODE_THREADED);
+  $comments_per_page = variable_get('comment_default_per_page_' . $node->type->value, 50);
   $pagenum = NULL;
   $flat = $mode == COMMENT_MODE_FLAT ? TRUE : FALSE;
   if ($num_comments <= $comments_per_page) {
@@ -584,7 +584,7 @@ function comment_new_page_count($num_comments, $new_replies, Node $node) {
     // 1. Find all the threads with a new comment.
     $unread_threads_query = db_select('comment')
       ->fields('comment', array('thread'))
-      ->condition('nid', $node->nid)
+      ->condition('nid', $node->nid->value)
       ->condition('status', COMMENT_PUBLISHED)
       ->orderBy('created', 'DESC')
       ->orderBy('cid', 'DESC')
@@ -604,7 +604,7 @@ function comment_new_page_count($num_comments, $new_replies, Node $node) {
     // Find the number of the first comment of the first unread thread.
     $count = db_query('SELECT COUNT(*) FROM {comment} WHERE nid = :nid AND status = :status AND SUBSTRING(thread, 1, (LENGTH(thread) - 1)) < :thread', array(
       ':status' => COMMENT_PUBLISHED,
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':thread' => $first_thread,
     ))->fetchField();
 
@@ -644,12 +644,12 @@ function theme_comment_block() {
 function comment_node_view(Node $node, $view_mode) {
   $links = array();
 
-  if ($node->comment != COMMENT_NODE_HIDDEN) {
+  if ($node->comment->value != COMMENT_NODE_HIDDEN) {
     if ($view_mode == 'rss') {
       // Add a comments RSS element which is a URL to the comments of this node.
       $node->rss_elements[] = array(
         'key' => 'comments',
-        'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE))
+        'value' => url('node/' . $node->nid->value, array('fragment' => 'comments', 'absolute' => TRUE))
       );
     }
     elseif ($view_mode == 'teaser') {
@@ -660,16 +660,16 @@ function comment_node_view(Node $node, $view_mode) {
         if (!empty($node->comment_count)) {
           $links['comment-comments'] = array(
             'title' => format_plural($node->comment_count, '1 comment', '@count comments'),
-            'href' => "node/$node->nid",
+            'href' => 'node/' . $node->nid->value,
             'attributes' => array('title' => t('Jump to the first comment of this posting.')),
             'fragment' => 'comments',
             'html' => TRUE,
           );
           // Show a link to the first new comment.
-          if ($new = comment_num_new($node->nid)) {
+          if ($new = comment_num_new($node->nid->value)) {
             $links['comment-new-comments'] = array(
               'title' => format_plural($new, '1 new comment', '@count new comments'),
-              'href' => "node/$node->nid",
+              'href' => 'node/' . $node->nid->value,
               'query' => comment_new_page_count($node->comment_count, $new, $node),
               'attributes' => array('title' => t('Jump to the first new comment of this posting.')),
               'fragment' => 'new',
@@ -678,17 +678,17 @@ function comment_node_view(Node $node, $view_mode) {
           }
         }
       }
-      if ($node->comment == COMMENT_NODE_OPEN) {
-        $comment_form_location = variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW);
+      if ($node->comment->value == COMMENT_NODE_OPEN) {
+        $comment_form_location = variable_get('comment_form_location_' . $node->type->value, COMMENT_FORM_BELOW);
         if (user_access('post comments')) {
           $links['comment-add'] = array(
             'title' => t('Add new comment'),
-            'href' => "node/$node->nid",
+            'href' => 'node/' . $node->nid->value,
             'attributes' => array('title' => t('Add a new comment to this page.')),
             'fragment' => 'comment-form',
           );
           if ($comment_form_location == COMMENT_FORM_SEPARATE_PAGE) {
-            $links['comment-add']['href'] = "comment/reply/$node->nid";
+            $links['comment-add']['href'] = 'comment/reply/' . $node->nid->value;
           }
         }
         else {
@@ -704,8 +704,8 @@ function comment_node_view(Node $node, $view_mode) {
       // allowed to post comments and if this node is allowing new comments.
       // But we don't want this link if we're building the node for search
       // indexing or constructing a search result excerpt.
-      if ($node->comment == COMMENT_NODE_OPEN) {
-        $comment_form_location = variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW);
+      if ($node->comment->value == COMMENT_NODE_OPEN) {
+        $comment_form_location = variable_get('comment_form_location_' . $node->type->value, COMMENT_FORM_BELOW);
         if (user_access('post comments')) {
           // Show the "post comment" link if the form is on another page, or
           // if there are existing comments that the link will skip past.
@@ -713,11 +713,11 @@ function comment_node_view(Node $node, $view_mode) {
             $links['comment-add'] = array(
               'title' => t('Add new comment'),
               'attributes' => array('title' => t('Share your thoughts and opinions related to this posting.')),
-              'href' => "node/$node->nid",
+              'href' => 'node/'. $node->nid->value,
               'fragment' => 'comment-form',
             );
             if ($comment_form_location == COMMENT_FORM_SEPARATE_PAGE) {
-              $links['comment-add']['href'] = "comment/reply/$node->nid";
+              $links['comment-add']['href'] = 'comment/reply/' . $node->nid->value;
             }
           }
         }
@@ -740,7 +740,7 @@ function comment_node_view(Node $node, $view_mode) {
     // page. We compare $node and $page_node to ensure that comments are not
     // appended to other nodes shown on the page, for example a node_reference
     // displayed in 'full' view mode within another node.
-    if ($node->comment && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
+    if ($node->comment->value && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
       $node->content['comments'] = comment_node_page_additions($node);
     }
   }
@@ -763,8 +763,8 @@ function comment_node_page_additions(Node $node) {
   // Unpublished comments are not included in $node->comment_count, so show
   // comments unconditionally if the user is an administrator.
   if (($node->comment_count && user_access('access comments')) || user_access('administer comments')) {
-    $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED);
-    $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50);
+    $mode = variable_get('comment_default_mode_' . $node->type->value, COMMENT_MODE_THREADED);
+    $comments_per_page = variable_get('comment_default_per_page_' . $node->type->value, 50);
     if ($cids = comment_get_thread($node, $mode, $comments_per_page)) {
       $comments = comment_load_multiple($cids);
       comment_prepare_thread($comments);
@@ -775,13 +775,13 @@ function comment_node_page_additions(Node $node) {
   }
 
   // Append comment form if needed.
-  if (user_access('post comments') && $node->comment == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_BELOW)) {
+  if (user_access('post comments') && $node->comment->value == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type->value, COMMENT_FORM_BELOW) == COMMENT_FORM_BELOW)) {
     $additions['comment_form'] = comment_add($node);
   }
 
   if ($additions) {
     $additions += array(
-      '#theme' => 'comment_wrapper__node_' . $node->type,
+      '#theme' => 'comment_wrapper__node_' . $node->type->value,
       '#node' => $node,
       'comments' => array(),
       'comment_form' => array(),
@@ -804,7 +804,7 @@ function comment_node_page_additions(Node $node) {
  *   The renderable array for the comment addition form.
  */
 function comment_add(Node $node, $pid = NULL) {
-  $values = array('nid' => $node->nid, 'pid' => $pid, 'node_type' => 'comment_node_' . $node->type);
+  $values = array('nid' => $node->nid->value, 'pid' => $pid, 'node_type' => 'comment_node_' . $node->type->value);
   $comment = entity_create('comment', $values);
   return entity_get_form($comment);
 }
@@ -881,7 +881,7 @@ function comment_get_thread(Node $node, $mode, $comments_per_page) {
     ->extend('Drupal\Core\Database\Query\PagerSelectExtender');
   $query->addField('c', 'cid');
   $query
-    ->condition('c.nid', $node->nid)
+    ->condition('c.nid', $node->nid->value)
     ->addTag('node_access')
     ->addTag('comment_filter')
     ->addMetaData('base_table', 'comment')
@@ -891,7 +891,7 @@ function comment_get_thread(Node $node, $mode, $comments_per_page) {
   $count_query = db_select('comment', 'c');
   $count_query->addExpression('COUNT(*)');
   $count_query
-    ->condition('c.nid', $node->nid)
+    ->condition('c.nid', $node->nid->value)
     ->addTag('node_access')
     ->addTag('comment_filter')
     ->addMetaData('base_table', 'comment')
@@ -992,7 +992,7 @@ function comment_view(Comment $comment, Node $node, $view_mode = 'full', $langco
   unset($comment->content);
 
   $build += array(
-    '#theme' => 'comment__node_' . $node->type,
+    '#theme' => 'comment__node_' . $node->type->value,
     '#comment' => $comment,
     '#node' => $node,
     '#view_mode' => $view_mode,
@@ -1001,7 +1001,7 @@ function comment_view(Comment $comment, Node $node, $view_mode = 'full', $langco
 
   if (empty($comment->in_preview)) {
     $prefix = '';
-    $is_threaded = isset($comment->divs) && variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED) == COMMENT_MODE_THREADED;
+    $is_threaded = isset($comment->divs) && variable_get('comment_default_mode_' . $node->type->value, COMMENT_MODE_THREADED) == COMMENT_MODE_THREADED;
 
     // Add 'new' anchor if needed.
     if (!empty($comment->first_new)) {
@@ -1093,7 +1093,7 @@ function comment_build_content(Comment $comment, Node $node, $view_mode = 'full'
  */
 function comment_links(Comment $comment, Node $node) {
   $links = array();
-  if ($node->comment == COMMENT_NODE_OPEN) {
+  if ($node->comment->value == COMMENT_NODE_OPEN) {
     if (user_access('administer comments') && user_access('post comments')) {
       $links['comment-delete'] = array(
         'title' => t('delete'),
@@ -1273,8 +1273,8 @@ function comment_form_node_form_alter(&$form, $form_state) {
     ),
     '#weight' => 30,
   );
-  $comment_count = isset($node->nid) ? db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() : 0;
-  $comment_settings = ($node->comment == COMMENT_NODE_HIDDEN && empty($comment_count)) ? COMMENT_NODE_CLOSED : $node->comment;
+  $comment_count = isset($node->nid->value) ? db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid->value))->fetchField() : 0;
+  $comment_settings = ($node->comment->value == COMMENT_NODE_HIDDEN && empty($comment_count)) ? COMMENT_NODE_CLOSED : $node->comment->value;
   $form['comment_settings']['comment'] = array(
     '#type' => 'radios',
     '#title' => t('Comments'),
@@ -1315,14 +1315,14 @@ function comment_node_load($nodes, $types) {
   // assign values without hitting the database.
   foreach ($nodes as $node) {
     // Store whether comments are enabled for this node.
-    if ($node->comment != COMMENT_NODE_HIDDEN) {
-      $comments_enabled[] = $node->nid;
+    if ($node->comment->value != COMMENT_NODE_HIDDEN) {
+      $comments_enabled[] = $node->nid->value;
     }
     else {
       $node->cid = 0;
-      $node->last_comment_timestamp = $node->created;
+      $node->last_comment_timestamp = $node->created->value->getTimestamp();
       $node->last_comment_name = '';
-      $node->last_comment_uid = $node->uid;
+      $node->last_comment_uid = $node->uid->value;
       $node->comment_count = 0;
     }
   }
@@ -1344,8 +1344,8 @@ function comment_node_load($nodes, $types) {
  * Implements hook_node_prepare().
  */
 function comment_node_prepare(Node $node) {
-  if (!isset($node->comment)) {
-    $node->comment = variable_get("comment_$node->type", COMMENT_NODE_OPEN);
+  if (!isset($node->comment->value)) {
+    $node->comment = variable_get('comment_' . $node->type->value, COMMENT_NODE_OPEN);
   }
 }
 
@@ -1358,11 +1358,11 @@ function comment_node_insert(Node $node) {
   if (variable_get('comment_maintain_node_statistics', TRUE)) {
     db_insert('node_comment_statistics')
       ->fields(array(
-        'nid' => $node->nid,
+        'nid' => $node->nid->value,
         'cid' => 0,
-        'last_comment_timestamp' => $node->changed,
+        'last_comment_timestamp' => $node->changed->value->getTimestamp(),
         'last_comment_name' => NULL,
-        'last_comment_uid' => $node->uid,
+        'last_comment_uid' => $node->uid->value,
         'comment_count' => 0,
       ))
       ->execute();
@@ -1373,10 +1373,10 @@ function comment_node_insert(Node $node) {
  * Implements hook_node_predelete().
  */
 function comment_node_predelete(Node $node) {
-  $cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(':nid' => $node->nid))->fetchCol();
+  $cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(':nid' => $node->nid->value))->fetchCol();
   comment_delete_multiple($cids);
   db_delete('node_comment_statistics')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
@@ -1406,9 +1406,9 @@ function comment_node_update_index(Node $node, $langcode) {
   }
 
   if ($index_comments) {
-    $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED);
-    $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50);
-    if ($node->comment && $cids = comment_get_thread($node, $mode, $comments_per_page)) {
+    $mode = variable_get('comment_default_mode_' . $node->type->value, COMMENT_MODE_THREADED);
+    $comments_per_page = variable_get('comment_default_per_page_' . $node->type->value, 50);
+    if ($node->comment->value && $cids = comment_get_thread($node, $mode, $comments_per_page)) {
       $comments = comment_load_multiple($cids);
       comment_prepare_thread($comments);
       $build = comment_view_multiple($comments, $node, $langcode);
@@ -1434,11 +1434,11 @@ function comment_update_index() {
  */
 function comment_node_search_result(Node $node) {
   // Do not make a string if comments are hidden.
-  if (user_access('access comments') && $node->comment != COMMENT_NODE_HIDDEN) {
-    $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid))->fetchField();
+  if (user_access('access comments') && $node->comment->value != COMMENT_NODE_HIDDEN) {
+    $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid->value))->fetchField();
     // Do not make a string if comments are closed and there are currently
     // zero comments.
-    if ($node->comment != COMMENT_NODE_CLOSED || $comments > 0) {
+    if ($node->comment->value != COMMENT_NODE_CLOSED || $comments > 0) {
       return array('comment' => format_plural($comments, '1 comment', '@count comments'));
     }
   }
@@ -1799,7 +1799,7 @@ function template_preprocess_comment(&$variables) {
     $variables['attributes']['class'][] = 'by-anonymous';
   }
   else {
-    if ($comment->uid == $variables['node']->uid) {
+    if ($comment->uid == $variables['node']->uid->value) {
       $variables['attributes']['class'][] = 'by-node-author';
     }
     if ($comment->uid == $variables['user']->uid) {
@@ -1836,11 +1836,11 @@ function theme_comment_post_forbidden($variables) {
     if ($authenticated_post_comments) {
       // We cannot use drupal_get_destination() because these links
       // sometimes appear on /node and taxonomy listing pages.
-      if (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_SEPARATE_PAGE) {
-        $destination = array('destination' => "comment/reply/$node->nid#comment-form");
+      if (variable_get('comment_form_location_' . $node->type->value, COMMENT_FORM_BELOW) == COMMENT_FORM_SEPARATE_PAGE) {
+        $destination = array('destination' => 'comment/reply/' . $node->nid->value . '#comment-form');
       }
       else {
-        $destination = array('destination' => "node/$node->nid#comment-form");
+        $destination = array('destination' => 'node/' . $node->nid->value . '#comment-form');
       }
 
       if (config('user.settings')->get('register') != USER_REGISTER_ADMINISTRATORS_ONLY) {
@@ -1864,7 +1864,7 @@ function theme_comment_post_forbidden($variables) {
 function template_preprocess_comment_wrapper(&$variables) {
   // Provide contextual information.
   $variables['node'] = $variables['content']['#node'];
-  $variables['display_mode'] = variable_get('comment_default_mode_' . $variables['node']->type, COMMENT_MODE_THREADED);
+  $variables['display_mode'] = variable_get('comment_default_mode_' . $variables['node']->type->value, COMMENT_MODE_THREADED);
   // The comment form is optional and may not exist.
   $variables['content'] += array('comment_form' => array());
 }
diff --git a/core/modules/comment/comment.pages.inc b/core/modules/comment/comment.pages.inc
index ed91d23..9102831 100644
--- a/core/modules/comment/comment.pages.inc
+++ b/core/modules/comment/comment.pages.inc
@@ -36,7 +36,7 @@
  */
 function comment_reply(Node $node, $pid = NULL) {
   // Set the breadcrumb trail.
-  drupal_set_breadcrumb(array(l(t('Home'), NULL), l($node->label(), 'node/' . $node->nid)));
+  drupal_set_breadcrumb(array(l(t('Home'), NULL), l($node->label(), 'node/' . $node->nid->value)));
   $op = isset($_POST['op']) ? $_POST['op'] : '';
   $build = array();
 
@@ -47,7 +47,7 @@ function comment_reply(Node $node, $pid = NULL) {
     }
     else {
       drupal_set_message(t('You are not authorized to post comments.'), 'error');
-      drupal_goto("node/$node->nid");
+      drupal_goto('node/' . $node->nid->value);
     }
   }
   else {
@@ -59,25 +59,25 @@ function comment_reply(Node $node, $pid = NULL) {
         if ($comment->status == COMMENT_PUBLISHED) {
           // If that comment exists, make sure that the current comment and the
           // parent comment both belong to the same parent node.
-          if ($comment->nid != $node->nid) {
+          if ($comment->nid != $node->nid->value) {
             // Attempting to reply to a comment not belonging to the current nid.
             drupal_set_message(t('The comment you are replying to does not exist.'), 'error');
-            drupal_goto("node/$node->nid");
+            drupal_goto('node/' . $node->nid->value);
           }
           // Display the parent comment
-          $comment->node_type = 'comment_node_' . $node->type;
+          $comment->node_type = 'comment_node_' . $node->type->value;
           field_attach_load('comment', array($comment->cid => $comment));
           $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
           $build['comment_parent'] = comment_view($comment, $node);
         }
         else {
           drupal_set_message(t('The comment you are replying to does not exist.'), 'error');
-          drupal_goto("node/$node->nid");
+          drupal_goto('node/' . $node->nid->value);
         }
       }
       else {
         drupal_set_message(t('You are not authorized to view comments.'), 'error');
-        drupal_goto("node/$node->nid");
+        drupal_goto('node/' . $node->nid->value);
       }
     }
     // This is the case where the comment is in response to a node. Display the node.
@@ -86,16 +86,16 @@ function comment_reply(Node $node, $pid = NULL) {
     }
 
     // Should we show the reply box?
-    if ($node->comment != COMMENT_NODE_OPEN) {
+    if ($node->comment->value != COMMENT_NODE_OPEN) {
       drupal_set_message(t("This discussion is closed: you can't post new comments."), 'error');
-      drupal_goto("node/$node->nid");
+      drupal_goto('node/' . $node->nid->value);
     }
     elseif (user_access('post comments')) {
       $build['comment_form'] = comment_add($node, $pid);
     }
     else {
       drupal_set_message(t('You are not authorized to post comments.'), 'error');
-      drupal_goto("node/$node->nid");
+      drupal_goto('node/' . $node->nid->value);
     }
   }
 
diff --git a/core/modules/comment/comment.tokens.inc b/core/modules/comment/comment.tokens.inc
index c77cb67..069477b 100644
--- a/core/modules/comment/comment.tokens.inc
+++ b/core/modules/comment/comment.tokens.inc
@@ -233,7 +233,7 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
           break;
 
         case 'comment-count-new':
-          $replacements[$original] = comment_num_new($node->nid);
+          $replacements[$original] = comment_num_new($node->nid->value);
           break;
       }
     }
diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
index cead0cd..ff94c11 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
@@ -26,9 +26,9 @@ public function form(array $form, array &$form_state, EntityInterface $comment)
 
     // Use #comment-form as unique jump target, regardless of node type.
     $form['#id'] = drupal_html_id('comment_form');
-    $form['#theme'] = array('comment_form__node_' . $node->type, 'comment_form');
+    $form['#theme'] = array('comment_form__node_' . $node->type->value, 'comment_form');
 
-    $anonymous_contact = variable_get('comment_anonymous_' . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT);
+    $anonymous_contact = variable_get('comment_anonymous_' . $node->type->value, COMMENT_ANONYMOUS_MAYNOT_CONTACT);
     $is_admin = (!empty($comment->cid) && user_access('administer comments'));
 
     if (!$user->uid && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
@@ -158,7 +158,7 @@ public function form(array $form, array &$form_state, EntityInterface $comment)
       '#title' => t('Subject'),
       '#maxlength' => 64,
       '#default_value' => $comment->subject,
-      '#access' => variable_get('comment_subject_field_' . $node->type, 1) == 1,
+      '#access' => variable_get('comment_subject_field_' . $node->type->value, 1) == 1,
     );
 
     // Used for conditional validation of author fields.
@@ -171,7 +171,7 @@ public function form(array $form, array &$form_state, EntityInterface $comment)
     foreach (array('cid', 'pid', 'nid', 'uid') as $key) {
       $form[$key] = array('#type' => 'value', '#value' => $comment->$key);
     }
-    $form['node_type'] = array('#type' => 'value', '#value' => 'comment_node_' . $node->type);
+    $form['node_type'] = array('#type' => 'value', '#value' => 'comment_node_' . $node->type->value);
 
     // Make the comment inherit the current content language unless specifically
     // set.
@@ -186,7 +186,7 @@ public function form(array $form, array &$form_state, EntityInterface $comment)
     );
 
     // Attach fields.
-    $comment->node_type = 'comment_node_' . $node->type;
+    $comment->node_type = 'comment_node_' . $node->type->value;
 
     return parent::form($form, $form_state, $comment);
   }
@@ -198,7 +198,7 @@ protected function actions(array $form, array &$form_state) {
     $element = parent::actions($form, $form_state);
     $comment = $this->getEntity($form_state);
     $node = $form_state['comment']['node'];
-    $preview_mode = variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL);
+    $preview_mode = variable_get('comment_preview_' . $node->type->value, DRUPAL_OPTIONAL);
 
     // No delete action on the comment form.
     unset($element['delete']);
@@ -335,7 +335,7 @@ public function save(array $form, array &$form_state) {
     $node = node_load($form_state['values']['nid']);
     $comment = $this->getEntity($form_state);
 
-    if (user_access('post comments') && (user_access('administer comments') || $node->comment == COMMENT_NODE_OPEN)) {
+    if (user_access('post comments') && (user_access('administer comments') || $node->comment->value == COMMENT_NODE_OPEN)) {
       // Save the anonymous user information to a cookie for reuse.
       if (user_is_anonymous()) {
         user_cookie_save(array_intersect_key($form_state['values'], array_flip(array('name', 'mail', 'homepage'))));
@@ -358,18 +358,18 @@ public function save(array $form, array &$form_state) {
       }
       $query = array();
       // Find the current display page for this comment.
-      $page = comment_get_display_page($comment->cid, $node->type);
+      $page = comment_get_display_page($comment->cid, $node->type->value);
       if ($page > 0) {
         $query['page'] = $page;
       }
       // Redirect to the newly posted comment.
-      $redirect = array('node/' . $node->nid, array('query' => $query, 'fragment' => 'comment-' . $comment->cid));
+      $redirect = array('node/' . $node->nid->value, array('query' => $query, 'fragment' => 'comment-' . $comment->cid));
     }
     else {
       watchdog('content', 'Comment: unauthorized comment submitted or comment submitted to a closed post %subject.', array('%subject' => $comment->subject), WATCHDOG_WARNING);
       drupal_set_message(t('Comment: unauthorized comment submitted or comment submitted to a closed post %subject.', array('%subject' => $comment->subject)), 'error');
       // Redirect the user to the node they are commenting on.
-      $redirect = 'node/' . $node->nid;
+      $redirect = 'node/' . $node->nid->value;
     }
     $form_state['redirect'] = $redirect;
     // Clear the block and page caches so that anonymous users see the comment
diff --git a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php b/core/modules/comment/lib/Drupal/comment/CommentStorageController.php
index 4d447a5..97c1482 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentStorageController.php
@@ -67,7 +67,7 @@ protected function preSave(EntityInterface $comment) {
     // Make sure we have a proper bundle name.
     if (!isset($comment->node_type)) {
       $node = node_load($comment->nid);
-      $comment->node_type = 'comment_node_' . $node->type;
+      $comment->node_type = 'comment_node_' . $node->type->value;
     }
     if (!$comment->cid) {
       // Add the comment to database. This next section builds the thread field.
@@ -228,9 +228,9 @@ protected function updateNodeStatistics($nid) {
         ->fields(array(
           'cid' => 0,
           'comment_count' => 0,
-          'last_comment_timestamp' => $node->created,
+          'last_comment_timestamp' => $node->created->value->getTimestamp(),
           'last_comment_name' => '',
-          'last_comment_uid' => $node->uid,
+          'last_comment_uid' => $node->uid->value,
         ))
         ->condition('nid', $nid)
         ->execute();
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php
index 66eba33..9de2861 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php
@@ -53,7 +53,7 @@ function testAnonymous() {
     $this->drupalLogout();
 
     // Post anonymous comment with contact info (optional).
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $this->assertTrue($this->commentContactInfoAvailable(), 'Contact information available.');
 
     $anonymous_comment2 = $this->postComment($this->node, $this->randomName(), $this->randomName());
@@ -67,7 +67,7 @@ function testAnonymous() {
       'subject' => $this->randomName(),
       "comment_body[$langcode][0][value]" => $this->randomName(),
     );
-    $this->drupalPost('comment/reply/' . $this->node->nid, $edit, t('Save'));
+    $this->drupalPost('comment/reply/' . $this->node->nid->value, $edit, t('Save'));
     $this->assertText(t('The name you used belongs to a registered user.'));
 
     // Require contact info.
@@ -76,7 +76,7 @@ function testAnonymous() {
     $this->drupalLogout();
 
     // Try to post comment with contact info (required).
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $this->assertTrue($this->commentContactInfoAvailable(), 'Contact information available.');
 
     $anonymous_comment3 = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE);
@@ -125,12 +125,12 @@ function testAnonymous() {
     // Attempt to view comments while disallowed.
     // NOTE: if authenticated user has permission to post comments, then a
     // "Login or register to post comments" type link may be shown.
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertNoPattern('@<h2[^>]*>Comments</h2>@', 'Comments were not displayed.');
     $this->assertNoLink('Add new comment', 'Link to add comment was found.');
 
     // Attempt to view node-comment form while disallowed.
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $this->assertText('You are not authorized to post comments', 'Error attempting to post comment.');
     $this->assertNoFieldByName('subject', '', 'Subject field not found.');
     $this->assertNoFieldByName("comment_body[$langcode][0][value]", '', 'Comment field not found.');
@@ -140,7 +140,7 @@ function testAnonymous() {
       'post comments' => FALSE,
       'skip comment approval' => FALSE,
     ));
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
     $this->assertLink('Log in', 1, 'Link to log in was found.');
     $this->assertLink('register', 1, 'Link to register was found.');
@@ -150,12 +150,12 @@ function testAnonymous() {
       'post comments' => TRUE,
       'skip comment approval' => TRUE,
     ));
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertNoPattern('@<h2[^>]*>Comments</h2>@', 'Comments were not displayed.');
     $this->assertFieldByName('subject', '', 'Subject field found.');
     $this->assertFieldByName("comment_body[$langcode][0][value]", '', 'Comment field found.');
 
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $anonymous_comment3->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $anonymous_comment3->id);
     $this->assertText('You are not authorized to view comments', 'Error attempting to post reply.');
     $this->assertNoText($author_name, 'Comment not displayed.');
   }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentApprovalTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentApprovalTest.php
index 62a7812..ef67cdc 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentApprovalTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentApprovalTest.php
@@ -57,7 +57,7 @@ function testApprovalAdminInterface() {
     $this->performCommentOperation($anonymous_comment4, 'publish', TRUE);
     $this->drupalLogout();
 
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertTrue($this->commentExists($anonymous_comment4), 'Anonymous comment visible.');
 
     // Post 2 anonymous comments without contact info.
@@ -122,11 +122,11 @@ function testApprovalNodeInterface() {
     $this->assertResponse(403, 'Forged comment approval was denied.');
     $this->drupalGet('comment/1/approve', array('query' => array('token' => 'forged')));
     $this->assertResponse(403, 'Forged comment approval was denied.');
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->clickLink(t('approve'));
     $this->drupalLogout();
 
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertTrue($this->commentExists($anonymous_comment4), 'Anonymous comment visible.');
   }
 }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentFieldsTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentFieldsTest.php
index 43f9cc3..d7b2df2 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentFieldsTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentFieldsTest.php
@@ -107,6 +107,6 @@ function testCommentFormat() {
     // Post a comment without an explicit subject.
     $this->drupalLogin($this->web_user);
     $edit = array('comment_body[und][0][value]' => $this->randomName(8));
-    $this->drupalPost('node/' . $this->node->nid, $edit, t('Save'));
+    $this->drupalPost('node/' . $this->node->nid->value, $edit, t('Save'));
   }
 }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php
index 6ed97cb..64e4958 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php
@@ -52,7 +52,7 @@ function testCommentInterface() {
     $this->assertTrue($this->commentExists($comment), 'Comment found.');
 
     // Check comment display.
-    $this->drupalGet('node/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('node/' . $this->node->nid->value . '/' . $comment->id);
     $this->assertText($subject_text, 'Individual comment subject found.');
     $this->assertText($comment_text, 'Individual comment body found.');
 
@@ -72,7 +72,7 @@ function testCommentInterface() {
     $random_name = $this->randomName();
     $this->drupalGet('comment/' . $comment->id . '/edit');
     $comment = $this->postComment(NULL, $comment->comment, $comment->subject, array('name' => $random_name));
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertText($random_name . ' (' . t('not verified') . ')', 'Comment author successfully changed to an unverified user.');
 
     // Test changing the comment author to a verified user.
@@ -86,7 +86,7 @@ function testCommentInterface() {
     // Reply to comment #2 creating comment #3 with optional preview and no
     // subject though field enabled.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $comment->id);
     $this->assertText($subject_text, 'Individual comment-reply subject found.');
     $this->assertText($comment_text, 'Individual comment-reply body found.');
     $reply = $this->postComment(NULL, $this->randomName(), '', TRUE);
@@ -96,7 +96,7 @@ function testCommentInterface() {
     $this->assertEqual(rtrim($comment_loaded->thread, '/') . '.00/', $reply_loaded->thread, 'Thread of reply grows correctly.');
 
     // Second reply to comment #3 creating comment #4.
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $comment->id);
     $this->assertText($subject_text, 'Individual comment-reply subject found.');
     $this->assertText($comment_text, 'Individual comment-reply body found.');
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
@@ -117,34 +117,34 @@ function testCommentInterface() {
     $this->setCommentsPerPage(2);
     $comment_new_page = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE);
     $this->assertTrue($this->commentExists($comment_new_page), 'Page one exists. %s');
-    $this->drupalGet('node/' . $this->node->nid, array('query' => array('page' => 1)));
+    $this->drupalGet('node/' . $this->node->nid->value, array('query' => array('page' => 1)));
     $this->assertTrue($this->commentExists($reply, TRUE), 'Page two exists. %s');
     $this->setCommentsPerPage(50);
 
     // Attempt to reply to an unpublished comment.
     $reply_loaded->status = COMMENT_NOT_PUBLISHED;
     $reply_loaded->save();
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $reply_loaded->cid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $reply_loaded->cid);
     $this->assertText(t('The comment you are replying to does not exist.'), 'Replying to an unpublished comment');
 
     // Attempt to post to node with comments disabled.
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_HIDDEN));
     $this->assertTrue($this->node, 'Article node created.');
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $this->assertText('This discussion is closed', 'Posting to node with comments disabled');
     $this->assertNoField('edit-comment', 'Comment body field found.');
 
     // Attempt to post to node with read-only comments.
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_CLOSED));
     $this->assertTrue($this->node, 'Article node created.');
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $this->assertText('This discussion is closed', 'Posting to node with comments read-only');
     $this->assertNoField('edit-comment', 'Comment body field found.');
 
     // Attempt to post to node with comments enabled (check field names etc).
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_OPEN));
     $this->assertTrue($this->node, 'Article node created.');
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $this->assertNoText('This discussion is closed', 'Posting to node with comments enabled');
     $this->assertField('edit-comment-body-' . $langcode . '-0-value', 'Comment body field found.');
 
@@ -154,7 +154,7 @@ function testCommentInterface() {
     $this->deleteComment($comment);
     $this->deleteComment($comment_new_page);
 
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertFalse($this->commentExists($comment), 'Comment not found.');
     $this->assertFalse($this->commentExists($reply, TRUE), 'Reply not found.');
 
@@ -165,7 +165,7 @@ function testCommentInterface() {
 
     // Submit comment through node form.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $form_comment = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     $this->assertTrue($this->commentExists($form_comment), 'Form comment found.');
 
@@ -187,15 +187,15 @@ public function testCommentNewCommentsIndicator() {
     $this->assertNoLink(t('@count comments', array('@count' => 0)));
     $this->assertNoLink(t('@count new comments', array('@count' => 0)));
     $this->assertLink(t('Read more'));
-    $count = $this->xpath('//div[@id=:id]/div[@class=:class]/ul/li', array(':id' => 'node-' . $this->node->nid, ':class' => 'link-wrapper'));
+    $count = $this->xpath('//div[@id=:id]/div[@class=:class]/ul/li', array(':id' => 'node-' . $this->node->nid->value, ':class' => 'link-wrapper'));
     $this->assertTrue(count($count) == 1, 'One child found');
 
     // Create a new comment. This helper function may be run with different
     // comment settings so use comment_save() to avoid complex setup.
     $comment = entity_create('comment', array(
       'cid' => NULL,
-      'nid' => $this->node->nid,
-      'node_type' => $this->node->type,
+      'nid' => $this->node->nid->value,
+      'node_type' => $this->node->type->value,
       'pid' => 0,
       'uid' => $this->loggedInUser->uid,
       'status' => COMMENT_PUBLISHED,
@@ -221,7 +221,7 @@ public function testCommentNewCommentsIndicator() {
     $this->assertLink(t('Read more'));
     $this->assertNoLink(t('1 new comment'));
     $this->assertNoLink(t('@count new comments', array('@count' => 0)));
-    $count = $this->xpath('//div[@id=:id]/div[@class=:class]/ul/li', array(':id' => 'node-' . $this->node->nid, ':class' => 'link-wrapper'));
+    $count = $this->xpath('//div[@id=:id]/div[@class=:class]/ul/li', array(':id' => 'node-' . $this->node->nid->value, ':class' => 'link-wrapper'));
     $this->assertTrue(count($count) == 2, print_r($count, TRUE));
   }
 
@@ -244,7 +244,7 @@ function testCommentClasses() {
 
       // Add a comment.
       $comment = entity_create('comment', array(
-        'nid' => $node->nid,
+        'nid' => $node->nid->value,
         'uid' => $case['comment_uid'],
         'status' => $case['comment_status'],
         'subject' => $this->randomName(),
@@ -273,7 +273,7 @@ function testCommentClasses() {
           break;
       }
       // Request the node with the comment.
-      $this->drupalGet('node/' . $node->nid);
+      $this->drupalGet('node/' . $node->nid->value);
 
       // Verify classes if the comment is visible for the current user.
       if ($case['comment_status'] == COMMENT_PUBLISHED || $case['user'] == 'admin') {
@@ -321,7 +321,7 @@ function testCommentClasses() {
           $this->assertTrue(count($comments) == 1, 'new class found.');
 
           // Request the node again. The new class should disappear.
-          $this->drupalGet('node/' . $node->nid);
+          $this->drupalGet('node/' . $node->nid->value);
           $comments = $this->xpath('//*[contains(@class, "comment") and contains(@class, "new")]');
           $this->assertFalse(count($comments), 'new class not found.');
         }
@@ -349,8 +349,8 @@ function testCommentNodeCommentStatistics() {
     $this->web_user2 = $this->drupalCreateUser(array('access comments', 'post comments', 'create article content', 'edit own comments'));
 
     // Checks the initial values of node comment statistics with no comment.
-    $node = node_load($this->node->nid);
-    $this->assertEqual($node->last_comment_timestamp, $this->node->created, 'The initial value of node last_comment_timestamp is the node created date.');
+    $node = node_load($this->node->nid->value);
+    $this->assertEqual($node->last_comment_timestamp, $this->node->created->value->getTimestamp(), 'The initial value of node last_comment_timestamp is the node created date.');
     $this->assertEqual($node->last_comment_name, NULL, 'The initial value of node last_comment_name is NULL.');
     $this->assertEqual($node->last_comment_uid, $this->web_user->uid, 'The initial value of node last_comment_uid is the node uid.');
     $this->assertEqual($node->comment_count, 0, 'The initial value of node comment_count is zero.');
@@ -363,7 +363,7 @@ function testCommentNodeCommentStatistics() {
 
     // Checks the new values of node comment statistics with comment #1.
     // The node needs to be reloaded with a node_load_multiple cache reset.
-    $node = node_load($this->node->nid, TRUE);
+    $node = node_load($this->node->nid->value, TRUE);
     $this->assertEqual($node->last_comment_name, NULL, 'The value of node last_comment_name is NULL.');
     $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, 'The value of node last_comment_uid is the comment #1 uid.');
     $this->assertEqual($node->comment_count, 1, 'The value of node comment_count is 1.');
@@ -381,14 +381,14 @@ function testCommentNodeCommentStatistics() {
     $this->drupalLogout();
 
     // Post comment #2 as anonymous (comment approval enabled).
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $anonymous_comment = $this->postComment($this->node, $this->randomName(), '', TRUE);
     $comment_unpublished_loaded = comment_load($anonymous_comment->id);
 
     // Checks the new values of node comment statistics with comment #2 and
     // ensure they haven't changed since the comment has not been moderated.
     // The node needs to be reloaded with a node_load_multiple cache reset.
-    $node = node_load($this->node->nid, TRUE);
+    $node = node_load($this->node->nid->value, TRUE);
     $this->assertEqual($node->last_comment_name, NULL, 'The value of node last_comment_name is still NULL.');
     $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, 'The value of node last_comment_uid is still the comment #1 uid.');
     $this->assertEqual($node->comment_count, 1, 'The value of node comment_count is still 1.');
@@ -403,13 +403,13 @@ function testCommentNodeCommentStatistics() {
     $this->drupalLogout();
 
     // Post comment #3 as anonymous.
-    $this->drupalGet('comment/reply/' . $this->node->nid);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value);
     $anonymous_comment = $this->postComment($this->node, $this->randomName(), '', array('name' => $this->randomName()));
     $comment_loaded = comment_load($anonymous_comment->id);
 
     // Checks the new values of node comment statistics with comment #3.
     // The node needs to be reloaded with a node_load_multiple cache reset.
-    $node = node_load($this->node->nid, TRUE);
+    $node = node_load($this->node->nid->value, TRUE);
     $this->assertEqual($node->last_comment_name, $comment_loaded->name, 'The value of node last_comment_name is the name of the anonymous user.');
     $this->assertEqual($node->last_comment_uid, 0, 'The value of node last_comment_uid is zero.');
     $this->assertEqual($node->comment_count, 2, 'The value of node comment_count is 2.');
@@ -523,8 +523,8 @@ function setEnvironment(array $info) {
         // $this->postComment() relies on actual user permissions.
         $comment = entity_create('comment', array(
           'cid' => NULL,
-          'nid' => $this->node->nid,
-          'node_type' => $this->node->type,
+          'nid' => $this->node->nid->value,
+          'node_type' => $this->node->type->value,
           'pid' => 0,
           'uid' => 0,
           'status' => COMMENT_PUBLISHED,
@@ -538,7 +538,7 @@ function setEnvironment(array $info) {
 
         // comment_num_new() relies on node_last_viewed(), so ensure that no one
         // has seen the node of this comment.
-        db_delete('history')->condition('nid', $this->node->nid)->execute();
+        db_delete('history')->condition('nid', $this->node->nid->value)->execute();
       }
       else {
         $cids = db_query("SELECT cid FROM {comment}")->fetchCol();
@@ -548,10 +548,10 @@ function setEnvironment(array $info) {
     }
 
     // Change comment settings.
-    variable_set('comment_form_location_' . $this->node->type, $info['form']);
-    variable_set('comment_anonymous_' . $this->node->type, $info['contact']);
-    if ($this->node->comment != $info['comments']) {
-      $this->node->comment = $info['comments'];
+    variable_set('comment_form_location_' . $this->node->type->value, $info['form']);
+    variable_set('comment_anonymous_' . $this->node->type->value, $info['contact']);
+    if ($this->node->comment->value != $info['comments']) {
+      $this->node->comment->value = $info['comments'];
       node_save($this->node);
     }
 
@@ -604,7 +604,7 @@ function setEnvironment(array $info) {
   function assertCommentLinks(array $info) {
     $info = $this->setEnvironment($info);
 
-    $nid = $this->node->nid;
+    $nid = $this->node->nid->value;
 
     foreach (array('', "node/$nid") as $path) {
       $this->drupalGet($path);
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php
index 9c3af8e..1748407 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php
@@ -110,13 +110,13 @@ function testCommentLanguage() {
           'subject' => $this->randomName(),
           "comment_body[$langcode][0][value]" => $comment_values[$node_langcode][$langcode],
         );
-        $this->drupalPost("{$prefix}node/{$node->nid}", $edit, t('Preview'));
+        $this->drupalPost("{$prefix}node/{$node->nid->value}", $edit, t('Preview'));
         $this->drupalPost(NULL, $edit, t('Save'));
 
         // Check that comment language matches the current content language.
         $cid = db_select('comment', 'c')
           ->fields('c', array('cid'))
-          ->condition('nid', $node->nid)
+          ->condition('nid', $node->nid->value)
           ->orderBy('cid', 'DESC')
           ->range(0, 1)
           ->execute()
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeAccessTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeAccessTest.php
index 950cca9..14ec8e8 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeAccessTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeAccessTest.php
@@ -64,12 +64,12 @@ function testThreadedCommentView() {
     $this->assertTrue($this->commentExists($comment), 'Comment found.');
 
     // Check comment display.
-    $this->drupalGet('node/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('node/' . $this->node->nid->value . '/' . $comment->id);
     $this->assertText($comment_subject, 'Individual comment subject found.');
     $this->assertText($comment_text, 'Individual comment body found.');
 
     // Reply to comment, creating second comment.
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $comment->id);
     $reply_text = $this->randomName();
     $reply_subject = $this->randomName();
     $reply = $this->postComment(NULL, $reply_text, $reply_subject, TRUE);
@@ -77,7 +77,7 @@ function testThreadedCommentView() {
     $this->assertTrue($this->commentExists($reply, TRUE), 'Reply found.');
 
     // Go to the node page and verify comment and reply are visible.
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertText($comment_text);
     $this->assertText($comment_subject);
     $this->assertText($reply_text);
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeChangesTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeChangesTest.php
index b517d04..b471c85 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeChangesTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentNodeChangesTest.php
@@ -27,7 +27,7 @@ function testNodeDeletion() {
     $this->drupalLogin($this->web_user);
     $comment = $this->postComment($this->node, $this->randomName(), $this->randomName());
     $this->assertTrue(comment_load($comment->id), 'The comment could be loaded.');
-    node_delete($this->node->nid);
+    node_delete($this->node->nid->value);
     $this->assertFalse(comment_load($comment->id), 'The comment could not be loaded after the node was deleted.');
   }
 }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php
index e237f0e..88cc44c 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentPagerTest.php
@@ -45,20 +45,20 @@ function testCommentPaging() {
 
     // Check the first page of the node, and confirm the correct comments are
     // shown.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertRaw(t('next'), 'Paging links found.');
     $this->assertTrue($this->commentExists($comments[0]), 'Comment 1 appears on page 1.');
     $this->assertFalse($this->commentExists($comments[1]), 'Comment 2 does not appear on page 1.');
     $this->assertFalse($this->commentExists($comments[2]), 'Comment 3 does not appear on page 1.');
 
     // Check the second page.
-    $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 1)));
+    $this->drupalGet('node/' . $node->nid->value, array('query' => array('page' => 1)));
     $this->assertTrue($this->commentExists($comments[1]), 'Comment 2 appears on page 2.');
     $this->assertFalse($this->commentExists($comments[0]), 'Comment 1 does not appear on page 2.');
     $this->assertFalse($this->commentExists($comments[2]), 'Comment 3 does not appear on page 2.');
 
     // Check the third page.
-    $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 2)));
+    $this->drupalGet('node/' . $node->nid->value, array('query' => array('page' => 2)));
     $this->assertTrue($this->commentExists($comments[2]), 'Comment 3 appears on page 3.');
     $this->assertFalse($this->commentExists($comments[0]), 'Comment 1 does not appear on page 3.');
     $this->assertFalse($this->commentExists($comments[1]), 'Comment 2 does not appear on page 3.');
@@ -66,27 +66,27 @@ function testCommentPaging() {
     // Post a reply to the oldest comment and test again.
     $replies = array();
     $oldest_comment = reset($comments);
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $oldest_comment->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $oldest_comment->id);
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     $this->setCommentsPerPage(2);
     // We are still in flat view - the replies should not be on the first page,
     // even though they are replies to the oldest comment.
-    $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 0)));
+    $this->drupalGet('node/' . $node->nid->value, array('query' => array('page' => 0)));
     $this->assertFalse($this->commentExists($reply, TRUE), 'In flat mode, reply does not appear on page 1.');
 
     // If we switch to threaded mode, the replies on the oldest comment
     // should be bumped to the first page and comment 6 should be bumped
     // to the second page.
     $this->setCommentSettings('comment_default_mode', COMMENT_MODE_THREADED, t('Switched to threaded mode.'));
-    $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 0)));
+    $this->drupalGet('node/' . $node->nid->value, array('query' => array('page' => 0)));
     $this->assertTrue($this->commentExists($reply, TRUE), 'In threaded mode, reply appears on page 1.');
     $this->assertFalse($this->commentExists($comments[1]), 'In threaded mode, comment 2 has been bumped off of page 1.');
 
     // If (# replies > # comments per page) in threaded expanded view,
     // the overage should be bumped.
     $reply2 = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
-    $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 0)));
+    $this->drupalGet('node/' . $node->nid->value, array('query' => array('page' => 0)));
     $this->assertFalse($this->commentExists($reply2, TRUE), 'In threaded mode where # replies > # comments per page, the newest reply does not appear on page 1.');
 
     $this->drupalLogout();
@@ -114,19 +114,19 @@ function testCommentOrderingThreading() {
     $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the second comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $comments[1]->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $comments[1]->id);
     $comments[] = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the first comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $comments[0]->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $comments[0]->id);
     $comments[] = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the last comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $comments[2]->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $comments[2]->id);
     $comments[] = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the second comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $comments[3]->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $comments[3]->id);
     $comments[] = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     // At this point, the comment tree is:
@@ -149,7 +149,7 @@ function testCommentOrderingThreading() {
       5,
       6,
     );
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertCommentOrder($comments, $expected_order);
 
     $this->setCommentSettings('comment_default_mode', COMMENT_MODE_THREADED, t('Switched to threaded mode.'));
@@ -163,7 +163,7 @@ function testCommentOrderingThreading() {
       2,
       5,
     );
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertCommentOrder($comments, $expected_order);
   }
 
@@ -215,15 +215,15 @@ function testCommentNewPageIndicator() {
     $comments[] = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the second comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $comments[1]->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $comments[1]->id);
     $comments[] = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the first comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $comments[0]->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $comments[0]->id);
     $comments[] = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the last comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $comments[2]->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $comments[2]->id);
     $comments[] = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
 
     // At this point, the comment tree is:
@@ -245,7 +245,7 @@ function testCommentNewPageIndicator() {
       6 => 0, // Page of comment 0
     );
 
-    $node = node_load($node->nid);
+    $node = node_load($node->nid->value);
     foreach ($expected_pages as $new_replies => $expected_page) {
       $returned = comment_new_page_count($node->comment_count, $new_replies, $node);
       $returned_page = is_array($returned) ? $returned['page'] : 0;
@@ -263,7 +263,7 @@ function testCommentNewPageIndicator() {
       6 => 0, // Page of comment 0
     );
 
-    $node = node_load($node->nid);
+    $node = node_load($node->nid->value);
     foreach ($expected_pages as $new_replies => $expected_page) {
       $returned = comment_new_page_count($node->comment_count, $new_replies, $node);
       $returned_page = is_array($returned) ? $returned['page'] : 0;
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
index e9e197a..659f4d3 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
@@ -48,7 +48,7 @@ function testCommentPreview() {
     $edit = array();
     $edit['subject'] = $this->randomName(8);
     $edit['comment_body[' . $langcode . '][0][value]'] = $this->randomName(16);
-    $this->drupalPost('node/' . $this->node->nid, $edit, t('Preview'));
+    $this->drupalPost('node/' . $this->node->nid->value, $edit, t('Preview'));
 
     // Check that the preview is displaying the title and body.
     $this->assertTitle(t('Preview comment | Drupal'), 'Page title is "Preview comment".');
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentRssTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentRssTest.php
index 28e199e..eb4ae5a 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentRssTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentRssTest.php
@@ -27,7 +27,7 @@ function testCommentRss() {
     $this->drupalLogin($this->web_user);
     $comment = $this->postComment($this->node, $this->randomName(), $this->randomName());
     $this->drupalGet('rss.xml');
-    $raw = '<comments>' . url('node/' . $this->node->nid, array('fragment' => 'comments', 'absolute' => TRUE)) . '</comments>';
+    $raw = '<comments>' . url('node/' . $this->node->nid->value, array('fragment' => 'comments', 'absolute' => TRUE)) . '</comments>';
     $this->assertRaw($raw, 'Comments as part of RSS feed.');
 
     // Hide comments from RSS feed and check presence.
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php
index db98d54..1211c40 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php
@@ -57,7 +57,7 @@ function postComment($node, $comment, $subject = '', $contact = NULL) {
 
     // Must get the page before we test for fields.
     if ($node !== NULL) {
-      $this->drupalGet('comment/reply/' . $node->nid);
+      $this->drupalGet('comment/reply/' . $node->nid->value);
     }
 
     if ($subject_mode == TRUE) {
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php
index 1c57146..8a58528 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php
@@ -47,14 +47,14 @@ function testCommentThreading() {
 
     // Reply to comment #1 creating comment #2.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $comment->id);
     $reply = $this->postComment(NULL, $this->randomName(), '', TRUE);
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($reply, TRUE), 'Comment #2. Reply found.');
     $this->assertEqual($reply_loaded->thread, '01.00/');
 
     // Reply to comment #2 creating comment #3.
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $reply->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $reply->id);
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($reply, TRUE), 'Comment #3. Second reply found.');
@@ -62,7 +62,7 @@ function testCommentThreading() {
 
     // Reply to comment #1 creating comment #4.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $comment->id);
     $reply = $this->postComment(NULL, $this->randomName(), '', TRUE);
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($comment), 'Comment #4. Third reply found.');
@@ -79,14 +79,14 @@ function testCommentThreading() {
 
     // Reply to comment #5 creating comment #6.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $comment->id);
     $reply = $this->postComment(NULL, $this->randomName(), '', TRUE);
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($reply, TRUE), 'Comment #6. Reply found.');
     $this->assertEqual($reply_loaded->thread, '02.00/');
 
     // Reply to comment #6 creating comment #7.
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $reply->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $reply->id);
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($reply, TRUE), 'Comment #7. Second reply found.');
@@ -94,7 +94,7 @@ function testCommentThreading() {
 
     // Reply to comment #5 creating comment #8.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
+    $this->drupalGet('comment/reply/' . $this->node->nid->value . '/' . $comment->id);
     $reply = $this->postComment(NULL, $this->randomName(), '', TRUE);
     $reply_loaded = comment_load($reply->id);
     $this->assertTrue($this->commentExists($comment), 'Comment #8. Third reply found.');
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
index 34674e8..aa3ccbf 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
@@ -39,7 +39,7 @@ function testCommentTokenReplacement() {
     $parent_comment = $this->postComment($node, $this->randomName(), $this->randomName(), TRUE);
 
     // Post a reply to the comment.
-    $this->drupalGet('comment/reply/' . $node->nid . '/' . $parent_comment->id);
+    $this->drupalGet('comment/reply/' . $node->nid->value . '/' . $parent_comment->id);
     $child_comment = $this->postComment(NULL, $this->randomName(), $this->randomName());
     $comment = comment_load($child_comment->id);
     $comment->homepage = 'http://example.org/';
@@ -64,7 +64,7 @@ function testCommentTokenReplacement() {
     $tests['[comment:parent:cid]'] = $comment->pid;
     $tests['[comment:parent:title]'] = check_plain($parent_comment->subject);
     $tests['[comment:node:nid]'] = $comment->nid;
-    $tests['[comment:node:title]'] = check_plain($node->title);
+    $tests['[comment:node:title]'] = check_plain($node->title->value);
     $tests['[comment:author:uid]'] = $comment->uid;
     $tests['[comment:author:name]'] = check_plain($this->admin_user->name);
 
@@ -84,7 +84,7 @@ function testCommentTokenReplacement() {
     $tests['[comment:title]'] = $comment->subject;
     $tests['[comment:body]'] = $comment->comment_body[LANGUAGE_NOT_SPECIFIED][0]['value'];
     $tests['[comment:parent:title]'] = $parent_comment->subject;
-    $tests['[comment:node:title]'] = $node->title;
+    $tests['[comment:node:title]'] = $node->title->value;
     $tests['[comment:author:name]'] = $this->admin_user->name;
 
     foreach ($tests as $input => $expected) {
@@ -93,7 +93,7 @@ function testCommentTokenReplacement() {
     }
 
     // Load node so comment_count gets computed.
-    $node = node_load($node->nid);
+    $node = node_load($node->nid->value);
 
     // Generate comment tokens for the node (it has 2 comments, both new).
     $tests = array();
diff --git a/core/modules/comment/templates/comment-wrapper.tpl.php b/core/modules/comment/templates/comment-wrapper.tpl.php
index 72c5177..bfb8d94 100644
--- a/core/modules/comment/templates/comment-wrapper.tpl.php
+++ b/core/modules/comment/templates/comment-wrapper.tpl.php
@@ -34,7 +34,7 @@
  */
 ?>
 <section id="comments" <?php print $attributes; ?>>
-  <?php if ($content['comments'] && $node->type != 'forum'): ?>
+  <?php if ($content['comments'] && $node->type->value != 'forum'): ?>
     <?php print render($title_prefix); ?>
     <h2 class="title"><?php print t('Comments'); ?></h2>
     <?php print render($title_suffix); ?>
diff --git a/core/modules/dblog/lib/Drupal/dblog/Tests/DBLogTest.php b/core/modules/dblog/lib/Drupal/dblog/Tests/DBLogTest.php
index 2e6bb50..bd25357 100644
--- a/core/modules/dblog/lib/Drupal/dblog/Tests/DBLogTest.php
+++ b/core/modules/dblog/lib/Drupal/dblog/Tests/DBLogTest.php
@@ -307,13 +307,13 @@ private function doNode($type) {
     $this->assertTrue($node != NULL, format_string('Node @title was loaded', array('@title' => $title)));
     // Edit the node.
     $edit = $this->getContentUpdate($type);
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     $this->assertResponse(200);
     // Delete the node.
-    $this->drupalPost('node/' . $node->nid . '/delete', array(), t('Delete'));
+    $this->drupalPost('node/' . $node->nid->value . '/delete', array(), t('Delete'));
     $this->assertResponse(200);
     // View the node (to generate page not found event).
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertResponse(404);
     // View the database log report (to generate access denied event).
     $this->drupalGet('admin/reports/dblog');
@@ -343,7 +343,7 @@ private function doNode($type) {
     $this->drupalGet('admin/reports/page-not-found');
     $this->assertResponse(200);
     // Verify that the 'page not found' event was recorded.
-    $this->assertText(t('node/@nid', array('@nid' => $node->nid)), 'DBLog event was recorded: [page not found]');
+    $this->assertText(t('node/@nid', array('@nid' => $node->nid->value)), 'DBLog event was recorded: [page not found]');
   }
 
   /**
diff --git a/core/modules/field/field.attach.inc b/core/modules/field/field.attach.inc
index 2278826..64b2920 100644
--- a/core/modules/field/field.attach.inc
+++ b/core/modules/field/field.attach.inc
@@ -1210,6 +1210,13 @@ function field_attach_prepare_view($entity_type, $entities, $view_mode, $langcod
       // Add this entity to the items to be prepared.
       $prepare[$id] = $entity;
 
+      // Enable compatibility mode if necessary.
+      // @todo: Remove this once all entity types have been converted to the
+      // new property API.
+      if ($entity instanceof \Drupal\Core\Entity\EntityNG) {
+        $entity->setCompatibilityMode(TRUE);
+      }
+
       // Determine the actual language code to display for each field, given the
       // language codes available in the field data.
       $options['langcode'][$id] = field_language($entity_type, $entity, NULL, $langcode);
@@ -1226,6 +1233,15 @@ function field_attach_prepare_view($entity_type, $entities, $view_mode, $langcod
   // field_default_prepare_view() takes care of dispatching to the correct
   // formatters according to the display settings for the view mode.
   _field_invoke_multiple_default('prepare_view', $entity_type, $prepare, $view_mode, $null, $options);
+
+  // Disable compatibility mode if enabled previously.
+  // @todo: Remove this once all entity types have been converted to the
+  // new property API.
+  foreach ($prepare as $entity) {
+    if ($entity instanceof \Drupal\Core\Entity\EntityNG) {
+      $entity->setCompatibilityMode(FALSE);
+    }
+  }
 }
 
 /**
diff --git a/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php b/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php
index 5215be6..b1a4b78 100644
--- a/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php
+++ b/core/modules/field/modules/options/lib/Drupal/options/Tests/OptionsFieldUITest.php
@@ -87,7 +87,7 @@ function testOptionsAllowedValuesInteger() {
     $this->assertAllowedValuesInput("0|Zero", 'some values are being removed while currently in use', 'Values in use cannot be removed.');
 
     // Delete the node, remove the value.
-    node_delete($node->nid);
+    node_delete($node->nid->value);
     $string = "0|Zero";
     $array = array('0' => 'Zero');
     $this->assertAllowedValuesInput($string, $array, 'Values not in use can be removed.');
@@ -137,7 +137,7 @@ function testOptionsAllowedValuesFloat() {
     $this->assertAllowedValuesInput("0|Zero", 'some values are being removed while currently in use', 'Values in use cannot be removed.');
 
     // Delete the node, remove the value.
-    node_delete($node->nid);
+    node_delete($node->nid->value);
     $string = "0|Zero";
     $array = array('0' => 'Zero');
     $this->assertAllowedValuesInput($string, $array, 'Values not in use can be removed.');
@@ -192,7 +192,7 @@ function testOptionsAllowedValuesText() {
     $this->assertAllowedValuesInput("Zero", 'some values are being removed while currently in use', 'Values in use cannot be removed.');
 
     // Delete the node, remove the value.
-    node_delete($node->nid);
+    node_delete($node->nid->value);
     $string = "Zero";
     $array = array('Zero' => 'Zero');
     $this->assertAllowedValuesInput($string, $array, 'Values not in use can be removed.');
diff --git a/core/modules/field/modules/text/lib/Drupal/text/Tests/TextTranslationTest.php b/core/modules/field/modules/text/lib/Drupal/text/Tests/TextTranslationTest.php
index 77e6937..1e13188 100644
--- a/core/modules/field/modules/text/lib/Drupal/text/Tests/TextTranslationTest.php
+++ b/core/modules/field/modules/text/lib/Drupal/text/Tests/TextTranslationTest.php
@@ -79,7 +79,7 @@ function testTextField() {
     // Translate the article in french.
     $this->drupalPost('node/add/article', $edit, t('Save'));
     $node = $this->drupalGetNodeByTitle($edit['title']);
-    $this->drupalGet("node/$node->nid/translate");
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
     $this->clickLink(t('add translation'));
     $this->assertFieldByXPath("//textarea[@name='body[$langcode][0][value]']", $body, 'The textfield widget is populated.');
   }
@@ -126,7 +126,7 @@ function testTextFieldFormatted() {
 
     // Translate the article in french.
     $node = $this->drupalGetNodeByTitle($title);
-    $this->drupalGet("node/$node->nid/translate");
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
     $this->clickLink(t('add translation'));
     $this->assertNoText($body[0], t('The body field with delta @delta is hidden.', array('@delta' => 0)));
     $this->assertText($body[1], t('The body field with delta @delta is shown.', array('@delta' => 1)));
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldDisplayTest.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldDisplayTest.php
index 9d7dd30..db684b7 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileFieldDisplayTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldDisplayTest.php
@@ -46,7 +46,7 @@ function testNodeDisplay() {
         "fields[$field_name][type]" => $formatter,
       );
       $this->drupalPost("admin/structure/types/manage/$type_name/display", $edit, t('Save'));
-      $this->drupalGet('node/' . $node->nid);
+      $this->drupalGet('node/' . $node->nid->value);
       $this->assertNoText($field_name, t('Field label is hidden when no file attached for formatter %formatter', array('%formatter' => $formatter)));
     }
 
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldRevisionTest.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldRevisionTest.php
index 480f411..7dfb9ff 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileFieldRevisionTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldRevisionTest.php
@@ -48,7 +48,7 @@ function testRevisions() {
     // Check that the file exists on disk and in the database.
     $node = node_load($nid, TRUE);
     $node_file_r1 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
-    $node_vid_r1 = $node->vid;
+    $node_vid_r1 = $node->vid->value;
     $this->assertFileExists($node_file_r1, t('New file saved to disk on node creation.'));
     $this->assertFileEntryExists($node_file_r1, t('File entry exists in database on node creation.'));
     $this->assertFileIsPermanent($node_file_r1, t('File is permanent.'));
@@ -57,7 +57,7 @@ function testRevisions() {
     $this->replaceNodeFile($test_file, $field_name, $nid);
     $node = node_load($nid, TRUE);
     $node_file_r2 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
-    $node_vid_r2 = $node->vid;
+    $node_vid_r2 = $node->vid->value;
     $this->assertFileExists($node_file_r2, t('Replacement file exists on disk after creating new revision.'));
     $this->assertFileEntryExists($node_file_r2, t('Replacement file entry exists in database after creating new revision.'));
     $this->assertFileIsPermanent($node_file_r2, t('Replacement file is permanent.'));
@@ -74,7 +74,7 @@ function testRevisions() {
     $this->drupalPost('node/' . $nid . '/edit', array('revision' => '1'), t('Save'));
     $node = node_load($nid, TRUE);
     $node_file_r3 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
-    $node_vid_r3 = $node->vid;
+    $node_vid_r3 = $node->vid->value;
     $this->assertEqual($node_file_r2, $node_file_r3, t('Previous revision file still in place after creating a new revision without a new file.'));
     $this->assertFileIsPermanent($node_file_r3, t('New revision file is permanent.'));
 
@@ -82,7 +82,7 @@ function testRevisions() {
     $this->drupalPost('node/' . $nid . '/revisions/' . $node_vid_r1 . '/revert', array(), t('Revert'));
     $node = node_load($nid, TRUE);
     $node_file_r4 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
-    $node_vid_r4 = $node->vid;
+    $node_vid_r4 = $node->vid->value;
     $this->assertEqual($node_file_r1, $node_file_r4, t('Original revision file still in place after reverting to the original revision.'));
     $this->assertFileIsPermanent($node_file_r4, t('Original revision file still permanent after reverting to the original revision.'));
 
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php
index e291bec..1aae18d 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldTestBase.php
@@ -140,11 +140,11 @@ function uploadNodeFile($file, $field_name, $nid_or_type, $new_revision = TRUE,
       // Add a new node.
       $extras['type'] = $nid_or_type;
       $node = $this->drupalCreateNode($extras);
-      $nid = $node->nid;
+      $nid = $node->nid->value;
       // Save at least one revision to better simulate a real site.
       $this->drupalCreateNode(get_object_vars($node));
       $node = node_load($nid, TRUE);
-      $this->assertNotEqual($nid, $node->vid, t('Node revision exists.'));
+      $this->assertNotEqual($nid, $node->vid->value, t('Node revision exists.'));
     }
 
     // Attach a file to the node.
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php
index 0bb8866..59cd5a7 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php
@@ -305,7 +305,7 @@ function testPrivateFileComment() {
     $edit = array(
       'status' => FALSE,
     );
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
     // Ensures normal user can no longer download the file.
     $this->drupalLogin($user);
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
index 21540da..054458c 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
@@ -214,14 +214,14 @@ function testFilterAdmin() {
     $node = $this->drupalGetNodeByTitle($edit["title"]);
     $this->assertTrue($node, t('Node found in database.'));
 
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertRaw($body . $extra_text, t('Filter removed invalid tag.'));
 
     // Use plain text and see if it escapes all tags, whether allowed or not.
     $edit = array();
     $edit["body[$langcode][0][format]"] = $plain;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText(check_plain($text), t('The "Plain text" text format escapes all HTML tags.'));
 
     // Switch user.
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php
index 40991b6..5a29bda 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php
@@ -177,7 +177,7 @@ function testFormatWidgetPermissions() {
 
     // Try to edit with a less privileged user.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->clickLink(t('Edit'));
 
     // Verify that body field is read-only and contains replacement value.
@@ -201,7 +201,7 @@ function testFormatWidgetPermissions() {
     // administrator is never forced to switch the text format to something
     // else.)
     $this->drupalLogin($this->filter_admin_user);
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertFieldByXPath("//textarea[@name='$body_value_key' and @disabled='disabled']", t('This field has been disabled because you do not have sufficient permissions to edit it.'), t('Text format access denied message found.'));
 
     // Disable the text format used above.
@@ -212,13 +212,13 @@ function testFormatWidgetPermissions() {
     // is still disabled, since the less privileged user should not be able to
     // edit content that does not have an assigned format.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertFieldByXPath("//textarea[@name='$body_value_key' and @disabled='disabled']", t('This field has been disabled because you do not have sufficient permissions to edit it.'), t('Text format access denied message found.'));
 
     // Log back in as the filter administrator and verify that the body field
     // can be edited.
     $this->drupalLogin($this->filter_admin_user);
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertNoFieldByXPath("//textarea[@name='$body_value_key' and @disabled='disabled']", NULL, t('Text format access denied message not found.'));
     $this->assertFieldByXPath("//select[@name='$body_format_key']", NULL, t('Text format selector found.'));
 
@@ -227,16 +227,16 @@ function testFormatWidgetPermissions() {
     $old_title = $new_edit['title'];
     $new_title = $this->randomName(8);
     $edit = array('title' => $new_title);
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), t('Error message is displayed.'));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($old_title, t('Old title found.'));
     $this->assertNoText($new_title, t('New title not found.'));
 
     // Now select a new text format and make sure the node can be saved.
     $edit[$body_format_key] = filter_fallback_format();
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
-    $this->assertUrl('node/' . $node->nid);
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
+    $this->assertUrl('node/' . $node->nid->value);
     $this->assertText($new_title, t('New title found.'));
     $this->assertNoText($old_title, t('Old title not found.'));
 
@@ -244,8 +244,8 @@ function testFormatWidgetPermissions() {
     // other formats on the site (leaving only the fallback format).
     $this->drupalLogin($this->admin_user);
     $edit = array($body_format_key => $this->allowed_format->format);
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
-    $this->assertUrl('node/' . $node->nid);
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
+    $this->assertUrl('node/' . $node->nid->value);
     foreach (filter_formats() as $format) {
       if ($format->format != filter_fallback_format()) {
         filter_format_disable($format);
@@ -261,14 +261,14 @@ function testFormatWidgetPermissions() {
     $old_title = $new_title;
     $new_title = $this->randomName(8);
     $edit = array('title' => $new_title);
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), t('Error message is displayed.'));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($old_title, t('Old title found.'));
     $this->assertNoText($new_title, t('New title not found.'));
     $edit[$body_format_key] = filter_fallback_format();
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
-    $this->assertUrl('node/' . $node->nid);
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
+    $this->assertUrl('node/' . $node->nid->value);
     $this->assertText($new_title, t('New title found.'));
     $this->assertNoText($old_title, t('Old title not found.'));
   }
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
index 9c2c46c..2b6c293 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
@@ -61,7 +61,7 @@ function testDisableFilterModule() {
     $node = $this->drupalCreateNode(array('promote' => 1));
     $body_raw = $node->body[LANGUAGE_NOT_SPECIFIED][0]['value'];
     $format_id = $node->body[LANGUAGE_NOT_SPECIFIED][0]['format'];
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($body_raw, t('Node body found.'));
 
     // Enable the filter_test_replace filter.
@@ -71,7 +71,7 @@ function testDisableFilterModule() {
     $this->drupalPost('admin/config/content/formats/' . $format_id, $edit, t('Save configuration'));
 
     // Verify that filter_test_replace filter replaced the content.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertNoText($body_raw, t('Node body not found.'));
     $this->assertText('Filter: Testing filter', t('Testing filter output found.'));
 
@@ -79,7 +79,7 @@ function testDisableFilterModule() {
     $this->drupalPost('admin/config/content/formats/' . $format_id . '/disable', array(), t('Disable'));
 
     // Verify that the content is empty, because the text format does not exist.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertNoText($body_raw, t('Node body not found.'));
   }
 }
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index f365491..29bc14e 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -255,7 +255,7 @@ function forum_uri($forum) {
  */
 function _forum_node_check_node_type(Node $node) {
   // Fetch information about the forum field.
-  $instance = field_info_instance('node', 'taxonomy_forums', $node->type);
+  $instance = field_info_instance('node', 'taxonomy_forums', $node->type->value);
   return !empty($instance);
 }
 
@@ -332,7 +332,7 @@ function forum_node_presave(Node $node) {
     $langcode = key($node->taxonomy_forums);
     if (!empty($node->taxonomy_forums[$langcode])) {
       $node->forum_tid = $node->taxonomy_forums[$langcode][0]['tid'];
-      $old_tid = db_query_range("SELECT f.tid FROM {forum} f INNER JOIN {node} n ON f.vid = n.vid WHERE n.nid = :nid ORDER BY f.vid DESC", 0, 1, array(':nid' => $node->nid))->fetchField();
+      $old_tid = db_query_range("SELECT f.tid FROM {forum} f INNER JOIN {node} n ON f.vid = n.vid WHERE n.nid = :nid ORDER BY f.vid DESC", 0, 1, array(':nid' => $node->nid->value))->fetchField();
       if ($old_tid && isset($node->forum_tid) && ($node->forum_tid != $old_tid) && !empty($node->shadow)) {
         // A shadow copy needs to be created. Retain new term and add old term.
         $node->taxonomy_forums[$langcode][] = array('tid' => $old_tid);
@@ -346,17 +346,17 @@ function forum_node_presave(Node $node) {
  */
 function forum_node_update(Node $node) {
   if (_forum_node_check_node_type($node)) {
-    if (empty($node->revision) && db_query('SELECT tid FROM {forum} WHERE nid=:nid', array(':nid' => $node->nid))->fetchField()) {
+    if (empty($node->revision) && db_query('SELECT tid FROM {forum} WHERE nid=:nid', array(':nid' => $node->nid->value))->fetchField()) {
       if (!empty($node->forum_tid)) {
         db_update('forum')
           ->fields(array('tid' => $node->forum_tid))
-          ->condition('vid', $node->vid)
+          ->condition('vid', $node->vid->value)
           ->execute();
       }
       // The node is removed from the forum.
       else {
         db_delete('forum')
-          ->condition('nid', $node->nid)
+          ->condition('nid', $node->nid->value)
           ->execute();
       }
     }
@@ -365,8 +365,8 @@ function forum_node_update(Node $node) {
         db_insert('forum')
           ->fields(array(
             'tid' => $node->forum_tid,
-            'vid' => $node->vid,
-            'nid' => $node->nid,
+            'vid' => $node->vid->value,
+            'nid' => $node->nid->value,
           ))
           ->execute();
       }
@@ -375,13 +375,13 @@ function forum_node_update(Node $node) {
     // revision.
     if (!empty($node->shadow)) {
       db_delete('forum')
-        ->condition('nid', $node->nid)
-        ->condition('vid', $node->vid)
+        ->condition('nid', $node->nid->value)
+        ->condition('vid', $node->vid->value)
         ->execute();
       db_insert('forum')
         ->fields(array(
-          'nid' => $node->nid,
-          'vid' => $node->vid,
+          'nid' => $node->nid->value,
+          'vid' => $node->vid->value,
           'tid' => $node->forum_tid,
         ))
         ->execute();
@@ -398,8 +398,8 @@ function forum_node_insert(Node $node) {
       $nid = db_insert('forum')
         ->fields(array(
           'tid' => $node->forum_tid,
-          'vid' => $node->vid,
-          'nid' => $node->nid,
+          'vid' => $node->vid->value,
+          'nid' => $node->nid->value,
         ))
         ->execute();
     }
@@ -412,10 +412,10 @@ function forum_node_insert(Node $node) {
 function forum_node_predelete(Node $node) {
   if (_forum_node_check_node_type($node)) {
     db_delete('forum')
-      ->condition('nid', $node->nid)
+      ->condition('nid', $node->nid->value)
       ->execute();
     db_delete('forum_index')
-      ->condition('nid', $node->nid)
+      ->condition('nid', $node->nid->value)
       ->execute();
   }
 }
@@ -427,7 +427,7 @@ function forum_node_load($nodes) {
   $node_vids = array();
   foreach ($nodes as $node) {
     if (_forum_node_check_node_type($node)) {
-      $node_vids[] = $node->vid;
+      $node_vids[] = $node->vid->value;
     }
   }
   if (!empty($node_vids)) {
@@ -730,15 +730,15 @@ function forum_block_view_pre_render($elements) {
  * Implements hook_form().
  */
 function forum_form(Node $node, &$form_state) {
-  $type = node_type_load($node->type);
+  $type = node_type_load($node->type->value);
   $form['title'] = array(
     '#type' => 'textfield',
     '#title' => check_plain($type->title_label),
-    '#default_value' => !empty($node->title) ? $node->title : '',
+    '#default_value' => !empty($node->title->value) ? $node->title->value : '',
     '#required' => TRUE, '#weight' => -5
   );
 
-  if (!empty($node->nid)) {
+  if (!empty($node->nid->value)) {
     $forum_terms = $node->taxonomy_forums;
     // If editing, give option to leave shadows.
     $shadow = (count($forum_terms) > 1);
@@ -1388,7 +1388,7 @@ function _forum_update_forum_index($nid) {
     db_update('forum_index')
       ->fields( array(
         'comment_count' => 0,
-        'last_comment_timestamp' => $node->created,
+        'last_comment_timestamp' => $node->created->value->getTimestamp(),
       ))
       ->condition('nid', $nid)
       ->execute();
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php
index 7ae7d5f..781be41 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php
@@ -69,8 +69,8 @@ function testForumIndexStatus() {
     $edit = array(
       'status' => FALSE,
     );
-    $this->drupalPost("node/{$node->nid}/edit", $edit, t('Save'));
-    $this->drupalGet("node/{$node->nid}");
+    $this->drupalPost("node/{$node->nid->value}/edit", $edit, t('Save'));
+    $this->drupalGet("node/{$node->nid->value}");
     $this->assertText(t('Access denied'), 'Unpublished node is no longer accessible.');
 
     // Verify that the node no longer appears on the index.
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php
index 5ad396a..2ce794c 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php
@@ -94,15 +94,15 @@ function testForumNodeAccess() {
     $this->drupalGet('/');
 
     // Ensure private node and public node are found.
-    $this->assertText($private_node->title, 'Private node found in block by $access_user');
-    $this->assertText($public_node->title, 'Public node found in block by $access_user');
+    $this->assertText($private_node->title->value, 'Private node found in block by $access_user');
+    $this->assertText($public_node->title->value, 'Public node found in block by $access_user');
 
     // Test for $no_access_user.
     $this->drupalLogin($no_access_user);
     $this->drupalGet('/');
 
     // Ensure private node is not found but public is found.
-    $this->assertNoText($private_node->title, 'Private node not found in block by $no_access_user');
-    $this->assertText($public_node->title, 'Public node found in block by $no_access_user');
+    $this->assertNoText($private_node->title->value, 'Private node not found in block by $no_access_user');
+    $this->assertText($public_node->title->value, 'Public node found in block by $no_access_user');
   }
 }
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
index a253e2b..1dfd942 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
@@ -205,13 +205,13 @@ function testForum() {
     $node = $this->createForumTopic($this->forum, FALSE);
     $edit = array();
     $edit['comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][value]'] = $this->randomName();
-    $this->drupalPost("node/$node->nid", $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value, $edit, t('Save'));
     $this->assertResponse(200);
 
     // Test editing a forum topic that has a comment.
     $this->drupalLogin($this->edit_any_topics_user);
     $this->drupalGet('forum/' . $this->forum['tid']);
-    $this->drupalPost("node/$node->nid/edit", array(), t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', array(), t('Save'));
     $this->assertResponse(200);
   }
 
@@ -500,7 +500,7 @@ function createForumTopic($forum, $container = FALSE) {
     $this->assertEqual($node->taxonomy_forums[LANGUAGE_NOT_SPECIFIED][0]['tid'], $tid, 'Saved forum topic was in the expected forum');
 
     // View forum topic.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertRaw($title, 'Subject was found');
     $this->assertRaw($body, 'Body was found');
 
@@ -543,7 +543,7 @@ private function verifyForums($node_user, Node $node, $admin, $response = 200) {
     $this->verifyForumView($this->root_forum);
 
     // View forum node.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertResponse(200);
     $this->assertTitle($node->label() . ' | Drupal', 'Forum node was displayed');
     $breadcrumb = array(
@@ -555,7 +555,7 @@ private function verifyForums($node_user, Node $node, $admin, $response = 200) {
     $this->assertRaw(theme('breadcrumb', array('breadcrumb' => $breadcrumb)), 'Breadcrumbs were displayed');
 
     // View forum edit node.
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertResponse($response);
     if ($response == 200) {
       $this->assertTitle('Edit Forum topic ' . $node->label() . ' | Drupal', 'Forum edit node was displayed');
@@ -565,23 +565,23 @@ private function verifyForums($node_user, Node $node, $admin, $response = 200) {
       // Edit forum node (including moving it to another forum).
       $edit = array();
       $langcode = LANGUAGE_NOT_SPECIFIED;
-      $edit["title"] = 'node/' . $node->nid;
+      $edit["title"] = 'node/' . $node->nid->value;
       $edit["body[$langcode][0][value]"] = $this->randomName(256);
       // Assume the topic is initially associated with $forum.
       $edit["taxonomy_forums[$langcode]"] = $this->root_forum['tid'];
       $edit['shadow'] = TRUE;
-      $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+      $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
       $this->assertRaw(t('Forum topic %title has been updated.', array('%title' => $edit["title"])), 'Forum node was edited');
 
       // Verify topic was moved to a different forum.
       $forum_tid = db_query("SELECT tid FROM {forum} WHERE nid = :nid AND vid = :vid", array(
-        ':nid' => $node->nid,
-        ':vid' => $node->vid,
+        ':nid' => $node->nid->value,
+        ':vid' => $node->vid->value,
       ))->fetchField();
       $this->assertTrue($forum_tid == $this->root_forum['tid'], 'The forum topic is linked to a different forum');
 
       // Delete forum node.
-      $this->drupalPost('node/' . $node->nid . '/delete', array(), t('Delete'));
+      $this->drupalPost('node/' . $node->nid->value . '/delete', array(), t('Delete'));
       $this->assertResponse($response);
       $this->assertRaw(t('Forum topic %title has been deleted.', array('%title' => $edit['title'])), 'Forum node was deleted');
     }
@@ -622,7 +622,7 @@ private function generateForumTopics($forum) {
     $this->nids = array();
     for ($i = 0; $i < 5; $i++) {
       $node = $this->createForumTopic($this->forum, FALSE);
-      $this->nids[] = $node->nid;
+      $this->nids[] = $node->nid->value;
     }
   }
 
diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php
index c6ac2d8..1fb1488 100644
--- a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php
+++ b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php
@@ -211,7 +211,7 @@ function testImageFieldDefaultImage() {
     // Create a new node, with no images and verify that no images are
     // displayed.
     $node = $this->drupalCreateNode(array('type' => 'article'));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     // Verify that no image is displayed on the page by checking for the class
     // that would be used on the image field.
     $this->assertNoPattern('<div class="(.*?)field-name-' . strtr($field_name, '_', '-') . '(.*?)">', 'No image displayed when no image is attached and no default image specified.');
@@ -228,7 +228,7 @@ function testImageFieldDefaultImage() {
     $image = file_load($field['settings']['default_image']);
     $this->assertTrue($image->status == FILE_STATUS_PERMANENT, 'The default image status is permanent.');
     $default_output = theme('image', array('uri' => $image->uri));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertRaw($default_output, 'Default image displayed when no user supplied image is present.');
 
     // Create a node with an image attached and ensure that the default image
@@ -271,7 +271,7 @@ function testImageFieldDefaultImage() {
     // image is displayed.
     $node = $this->drupalCreateNode(array('type' => 'article'));
     $default_output = theme('image', array('uri' => $image->uri));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertRaw($default_output, 'Default private image displayed when no user supplied image is present.');
   }
 }
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php
index a41d68b..e76e6d8 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php
@@ -118,7 +118,7 @@ function testContentTypeLanguageConfiguration() {
     );
     $node = $this->drupalCreateNode($edit);
     // Edit the content and ensure correct language is selected.
-    $path = 'node/' . $node->nid . '/edit';
+    $path = 'node/' . $node->nid->value . '/edit';
     $this->drupalGet($path);
     $this->assertRaw('<option value="' . $langcode . '" selected="selected">' .  $name . '</option>', t('Correct language selected.'));
     // Ensure we can change the node language.
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php
index bafb620..3dd6a18 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocalePathTest.php
@@ -77,7 +77,7 @@ function testPathLanguageConfiguration() {
     $path = 'admin/config/search/path/add';
     $english_path = $this->randomName(8);
     $edit = array(
-      'source'   => 'node/' . $node->nid,
+      'source'   => 'node/' . $node->nid->value,
       'alias'    => $english_path,
       'langcode' => 'en',
     );
@@ -86,7 +86,7 @@ function testPathLanguageConfiguration() {
     // Create a path alias in new custom language.
     $custom_language_path = $this->randomName(8);
     $edit = array(
-      'source'   => 'node/' . $node->nid,
+      'source'   => 'node/' . $node->nid->value,
       'alias'    => $custom_language_path,
       'langcode' => $langcode,
     );
@@ -105,15 +105,15 @@ function testPathLanguageConfiguration() {
 
     // Check priority of language for alias by source path.
     $edit = array(
-      'source'   => 'node/' . $node->nid,
+      'source'   => 'node/' . $node->nid->value,
       'alias'    => $custom_path,
       'langcode' => LANGUAGE_NOT_SPECIFIED,
     );
     path_save($edit);
-    $lookup_path = drupal_lookup_path('alias', 'node/' . $node->nid, 'en');
+    $lookup_path = drupal_lookup_path('alias', 'node/' . $node->nid->value, 'en');
     $this->assertEqual($english_path, $lookup_path, t('English language alias has priority.'));
     // Same check for language 'xx'.
-    $lookup_path = drupal_lookup_path('alias', 'node/' . $node->nid, $prefix);
+    $lookup_path = drupal_lookup_path('alias', 'node/' . $node->nid->value, $prefix);
     $this->assertEqual($custom_language_path, $lookup_path, t('Custom language alias has priority.'));
     path_delete($edit);
 
@@ -123,7 +123,7 @@ function testPathLanguageConfiguration() {
 
     // Assign a custom path alias to the first node with the English language.
     $edit = array(
-      'source'   => 'node/' . $first_node->nid,
+      'source'   => 'node/' . $first_node->nid->value,
       'alias'    => $custom_path,
       'langcode' => 'en',
     );
@@ -131,7 +131,7 @@ function testPathLanguageConfiguration() {
 
     // Assign a custom path alias to second node with LANGUAGE_NOT_SPECIFIED.
     $edit = array(
-      'source'   => 'node/' . $second_node->nid,
+      'source'   => 'node/' . $second_node->nid->value,
       'alias'    => $custom_path,
       'langcode' => LANGUAGE_NOT_SPECIFIED,
     );
diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php
index ba9841b..093d518 100644
--- a/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php
+++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php
@@ -78,7 +78,7 @@ function testMenuNodeFormWidget() {
     $edit = array(
       'menu[enabled]' => 1,
     );
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     // Assert that there is no link for the node.
     $this->drupalGet('');
     $this->assertNoLink($node_title);
@@ -89,36 +89,36 @@ function testMenuNodeFormWidget() {
       'menu[link_title]' => $node_title,
       'menu[weight]' => 17,
     );
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     // Assert that the link exists.
     $this->drupalGet('');
     $this->assertLink($node_title);
 
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertOptionSelected('edit-menu-weight', 17, 'Menu weight correct in edit form');
 
     // Edit the node and remove the menu link.
     $edit = array(
       'menu[enabled]' => FALSE,
     );
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     // Assert that there is no link for the node.
     $this->drupalGet('');
     $this->assertNoLink($node_title);
 
     // Add a menu link to the Management menu.
     $item = array(
-      'link_path' => 'node/' . $node->nid,
+      'link_path' => 'node/' . $node->nid->value,
       'link_title' => $this->randomName(16),
       'menu_name' => 'management',
     );
     menu_link_save($item);
 
     // Assert that disabled Management menu is not shown on the node/$nid/edit page.
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertText('Provide a menu link', 'Link in not allowed menu not shown in node edit form');
     // Assert that the link is still in the management menu after save.
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     $link = menu_link_load($item['mlid']);
     $this->assertTrue($link, 'Link in not allowed menu still exists after saving node');
 
@@ -129,13 +129,13 @@ function testMenuNodeFormWidget() {
     $child_node = $this->drupalCreateNode(array('type' => 'article'));
     // Assign a menu link to the second node, being a child of the first one.
     $child_item = array(
-      'link_path' => 'node/'. $child_node->nid,
+      'link_path' => 'node/'. $child_node->nid->value,
       'link_title' => $this->randomName(16),
       'plid' => $item['mlid'],
     );
     menu_link_save($child_item);
     // Edit the first node.
-    $this->drupalGet('node/'. $node->nid .'/edit');
+    $this->drupalGet('node/'. $node->nid->value .'/edit');
     // Assert that it is not possible to set the parent of the first node to itself or the second node.
     $this->assertNoOption('edit-menu-parent', 'navigation:'. $item['mlid']);
     $this->assertNoOption('edit-menu-parent', 'navigation:'. $child_item['mlid']);
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index cee4ba5..c195326 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -536,7 +536,7 @@ function menu_node_save(Node $node) {
     }
     elseif (trim($link['link_title'])) {
       $link['link_title'] = trim($link['link_title']);
-      $link['link_path'] = "node/$node->nid";
+      $link['link_path'] = 'node/' . $node->nid->value;
       if (trim($link['description'])) {
         $link['options']['attributes']['title'] = trim($link['description']);
       }
@@ -557,7 +557,7 @@ function menu_node_save(Node $node) {
  */
 function menu_node_predelete(Node $node) {
   // Delete all menu module links that point to this node.
-  $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/' . $node->nid), array('fetch' => PDO::FETCH_ASSOC));
+  $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/' . $node->nid->value), array('fetch' => PDO::FETCH_ASSOC));
   foreach ($result as $m) {
     menu_link_delete($m['mlid']);
   }
@@ -569,22 +569,22 @@ function menu_node_predelete(Node $node) {
 function menu_node_prepare(Node $node) {
   if (empty($node->menu)) {
     // Prepare the node for the edit form so that $node->menu always exists.
-    $menu_name = strtok(variable_get('menu_parent_' . $node->type, 'main-menu:0'), ':');
+    $menu_name = strtok(variable_get('menu_parent_' . $node->type->value, 'main-menu:0'), ':');
     $item = array();
-    if (isset($node->nid)) {
+    if (isset($node->nid->value)) {
       $mlid = FALSE;
       // Give priority to the default menu
-      $type_menus = variable_get('menu_options_' . $node->type, array('main-menu' => 'main-menu'));
+      $type_menus = variable_get('menu_options_' . $node->type->value, array('main-menu' => 'main-menu'));
       if (in_array($menu_name, $type_menus)) {
         $mlid = db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = :path AND menu_name = :menu_name AND module = 'menu' ORDER BY mlid ASC", 0, 1, array(
-          ':path' => 'node/' . $node->nid,
+          ':path' => 'node/' . $node->nid->value,
           ':menu_name' => $menu_name,
         ))->fetchField();
       }
       // Check all allowed menus if a link does not exist in the default menu.
       if (!$mlid && !empty($type_menus)) {
         $mlid = db_query_range("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu' AND menu_name IN (:type_menus) ORDER BY mlid ASC", 0, 1, array(
-          ':path' => 'node/' . $node->nid,
+          ':path' => 'node/' . $node->nid->value,
           ':type_menus' => array_values($type_menus),
         ))->fetchField();
       }
@@ -632,7 +632,7 @@ function menu_form_node_form_alter(&$form, $form_state) {
   // @todo This must be handled in a #process handler.
   $node = $form_state['controller']->getEntity($form_state);
   $link = $node->menu;
-  $type = $node->type;
+  $type = $node->type->value;
   // menu_parent_options() is goofy and can actually handle either a menu link
   // or a node type both as second argument. Pick based on whether there is
   // a link already (menu_node_prepare() sets mlid default to 0).
diff --git a/core/modules/node/lib/Drupal/node/Node.php b/core/modules/node/lib/Drupal/node/Node.php
index 45d93f0..8622037 100644
--- a/core/modules/node/lib/Drupal/node/Node.php
+++ b/core/modules/node/lib/Drupal/node/Node.php
@@ -8,12 +8,12 @@
 namespace Drupal\node;
 
 use Drupal\Core\Entity\ContentEntityInterface;
-use Drupal\Core\Entity\Entity;
+use Drupal\Core\Entity\EntityNG;
 
 /**
  * Defines the node entity class.
  */
-class Node extends Entity implements ContentEntityInterface {
+class Node extends EntityNG implements ContentEntityInterface {
 
   /**
    * The node ID.
@@ -163,17 +163,58 @@ class Node extends Entity implements ContentEntityInterface {
   public $revision_uid;
 
   /**
+   * The plain data values of the contained properties.
+   *
+   * Define some default values used.
+   *
+   * @var array
+   */
+  protected $values = array(
+    'langcode' => array(LANGUAGE_DEFAULT => array(0 => array('value' => LANGUAGE_NOT_SPECIFIED))),
+    'name' => array(LANGUAGE_DEFAULT => array(0 => array('value' => ''))),
+    'uid' => array(LANGUAGE_DEFAULT => array(0 => array('value' => 0))),
+  );
+
+  /**
+   * Overrides Entity::__construct().
+   */
+  public function __construct(array $values, $entity_type) {
+    parent::__construct($values, $entity_type);
+
+    // We unset all defined properties, so magic getters apply.
+    unset(
+      $this->nid,
+      $this->uuid,
+      $this->langcode,
+      $this->vid,
+      $this->title,
+      $this->uid,
+      $this->created,
+      $this->changed,
+      $this->status,
+      $this->sticky,
+      $this->promote,
+      $this->comment,
+      $this->type,
+      $this->tnid,
+      $this->translate,
+      $this->revision_timestamp,
+      $this->revision_uid
+    );
+  }
+
+  /**
    * Implements Drupal\Core\Entity\EntityInterface::id().
    */
   public function id() {
-    return $this->nid;
+    return $this->get('nid')->value;
   }
 
   /**
    * Implements Drupal\Core\Entity\EntityInterface::bundle().
    */
   public function bundle() {
-    return $this->type;
+    return $this->get('type')->value;
   }
 
   /**
@@ -189,6 +230,15 @@ public function createDuplicate() {
    * Overrides Drupal\Core\Entity\Entity::getRevisionId().
    */
   public function getRevisionId() {
-    return $this->vid;
+    return $this->get('vid')->value;
+  }
+
+  /**
+   * Implements EntityInterface::label().
+   *
+   * @todo Should EntityNG take care of this?
+   */
+  public function label($langcode = NULL) {
+    return parent::label($langcode)->value;
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php
index b9bf7eb..40a0ced 100644
--- a/core/modules/node/lib/Drupal/node/NodeFormController.php
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -8,12 +8,12 @@
 namespace Drupal\node;
 
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityFormController;
+use Drupal\Core\Entity\EntityFormControllerNG;
 
 /**
  * Form controller for the node edit forms.
  */
-class NodeFormController extends EntityFormController {
+class NodeFormController extends EntityFormControllerNG {
 
   /**
    * Prepares the node object.
@@ -25,12 +25,12 @@ class NodeFormController extends EntityFormController {
    */
   protected function prepareEntity(EntityInterface $node) {
     // Set up default values, if required.
-    $node_options = variable_get('node_options_' . $node->type, array('status', 'promote'));
+    $node_options = variable_get('node_options_' . $node->type->value, array('status', 'promote'));
     // If this is a new node, fill in the default values.
-    if (!isset($node->nid) || isset($node->is_new)) {
+    if (!isset($node->nid->value) || isset($node->is_new)) {
       foreach (array('status', 'promote', 'sticky') as $key) {
         // Multistep node forms might have filled in something already.
-        if (!isset($node->$key)) {
+        if (!isset($node->$key->value)) {
           $node->$key = (int) in_array($key, $node_options);
         }
       }
@@ -39,7 +39,7 @@ protected function prepareEntity(EntityInterface $node) {
       $node->created = REQUEST_TIME;
     }
     else {
-      $node->date = format_date($node->created, 'custom', 'Y-m-d H:i:s O');
+      $node->date = format_date($node->created->value->getTimestamp(), 'custom', 'Y-m-d H:i:s O');
       // Remove the log message from the original node entity.
       $node->log = NULL;
     }
@@ -67,28 +67,28 @@ public function form(array $form, array &$form_state, EntityInterface $node) {
     // Override the default CSS class name, since the user-defined node type
     // name in 'TYPE-node-form' potentially clashes with third-party class
     // names.
-    $form['#attributes']['class'][0] = drupal_html_class('node-' . $node->type . '-form');
+    $form['#attributes']['class'][0] = drupal_html_class('node-' . $node->type->value . '-form');
 
     // Basic node information.
     // These elements are just values so they are not even sent to the client.
     foreach (array('nid', 'vid', 'uid', 'created', 'type') as $key) {
       $form[$key] = array(
         '#type' => 'value',
-        '#value' => isset($node->$key) ? $node->$key : NULL,
+        '#value' => isset($node->$key->value) ? $node->$key->value : NULL,
       );
     }
 
     // Changed must be sent to the client, for later overwrite error checking.
     $form['changed'] = array(
       '#type' => 'hidden',
-      '#default_value' => isset($node->changed) ? $node->changed : NULL,
+      '#default_value' => isset($node->changed->value) ? $node->changed->value->getTimestamp() : NULL,
     );
 
     // Invoke hook_form() to get the node-specific bits. Can't use node_invoke()
     // because hook_form() needs to be able to receive $form_state by reference.
     // @todo hook_form() implementations are unable to add #validate or #submit
     //   handlers to the form buttons below. Remove hook_form() entirely.
-    $function = node_hook($node->type, 'form');
+    $function = node_hook($node->type->value, 'form');
     if ($function && ($extra = $function($node, $form_state))) {
       $form = array_merge_recursive($form, $extra);
     }
@@ -101,9 +101,9 @@ public function form(array $form, array &$form_state, EntityInterface $node) {
     $form['langcode'] = array(
       '#title' => t('Language'),
       '#type' => 'language_select',
-      '#default_value' => $node->langcode,
+      '#default_value' => $node->langcode->value,
       '#languages' => LANGUAGE_ALL,
-      '#access' => !variable_get('node_type_language_hidden_' . $node->type, TRUE),
+      '#access' => !variable_get('node_type_language_hidden_' . $node->type->value, TRUE),
     );
 
     $form['additional_settings'] = array(
@@ -152,7 +152,7 @@ public function form(array $form, array &$form_state, EntityInterface $node) {
       '#type' => 'textarea',
       '#title' => t('Revision log message'),
       '#rows' => 4,
-      '#default_value' => !empty($node->log) ? $node->log : '',
+      '#default_value' => !empty($node->log->value) ? $node->log->value : '',
       '#description' => t('Briefly describe the changes you have made.'),
     );
 
@@ -193,7 +193,7 @@ public function form(array $form, array &$form_state, EntityInterface $node) {
       '#type' => 'textfield',
       '#title' => t('Authored on'),
       '#maxlength' => 25,
-      '#description' => t('Format: %time. The date format is YYYY-MM-DD and %timezone is the time zone offset from UTC. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? date_format(date_create($node->date), 'Y-m-d H:i:s O') : format_date($node->created, 'custom', 'Y-m-d H:i:s O'), '%timezone' => !empty($node->date) ? date_format(date_create($node->date), 'O') : format_date($node->created, 'custom', 'O'))),
+      '#description' => t('Format: %time. The date format is YYYY-MM-DD and %timezone is the time zone offset from UTC. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? date_format(date_create($node->date), 'Y-m-d H:i:s O') : format_date($node->created->value->getTimestamp(), 'custom', 'Y-m-d H:i:s O'), '%timezone' => !empty($node->date) ? date_format(date_create($node->date), 'O') : format_date($node->created->value->getTimestamp(), 'custom', 'O'))),
       '#default_value' => !empty($node->date) ? $node->date : '',
     );
 
@@ -217,19 +217,19 @@ public function form(array $form, array &$form_state, EntityInterface $node) {
     $form['options']['status'] = array(
       '#type' => 'checkbox',
       '#title' => t('Published'),
-      '#default_value' => $node->status,
+      '#default_value' => $node->status->value,
     );
 
     $form['options']['promote'] = array(
       '#type' => 'checkbox',
       '#title' => t('Promoted to front page'),
-      '#default_value' => $node->promote,
+      '#default_value' => $node->promote->value,
     );
 
     $form['options']['sticky'] = array(
       '#type' => 'checkbox',
       '#title' => t('Sticky at top of lists'),
-      '#default_value' => $node->sticky,
+      '#default_value' => $node->sticky->value,
     );
 
     // This form uses a button-level #submit handler for the form's main submit
@@ -248,7 +248,7 @@ public function form(array $form, array &$form_state, EntityInterface $node) {
   protected function actions(array $form, array &$form_state) {
     $element = parent::actions($form, $form_state);
     $node = $this->getEntity($form_state);
-    $preview_mode = variable_get('node_preview_' . $node->type, DRUPAL_OPTIONAL);
+    $preview_mode = variable_get('node_preview_' . $node->type->value, DRUPAL_OPTIONAL);
 
     $element['preview'] = array(
       '#access' => $preview_mode != DRUPAL_DISABLED,
@@ -274,7 +274,7 @@ protected function actions(array $form, array &$form_state) {
   public function validate(array $form, array &$form_state) {
     $node = $this->buildEntity($form, $form_state);
 
-    if (isset($node->nid) && (node_last_changed($node->nid) > $node->changed)) {
+    if (isset($node->changed->value) && isset($node->nid->value) && (node_last_changed($node->nid->value) > $node->changed->value->getTimestamp())) {
       form_set_error('changed', t('The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved.'));
     }
 
@@ -295,7 +295,7 @@ public function validate(array $form, array &$form_state) {
     // hook_node_validate() for miscellaneous validation needed by modules.
     // Can't use node_invoke() or module_invoke_all(), because $form_state must
     // be receivable by reference.
-    if ($function = node_hook($node->type, 'validate')) {
+    if ($function = node_hook($node->type->value, 'validate')) {
       $function($node, $form, $form_state);
     }
     foreach (module_implements('node_validate') as $module) {
@@ -379,10 +379,10 @@ public function preview(array $form, array &$form_state) {
    */
   public function save(array $form, array &$form_state) {
     $node = $this->getEntity($form_state);
-    $insert = empty($node->nid);
+    $insert = empty($node->nid->value);
     $node->save();
-    $node_link = l(t('view'), 'node/' . $node->nid);
-    $watchdog_args = array('@type' => $node->type, '%title' => $node->label());
+    $node_link = l(t('view'), 'node/' . $node->nid->value);
+    $watchdog_args = array('@type' => $node->type->value, '%title' => $node->label());
     $t_args = array('@type' => node_get_type_label($node), '%title' => $node->label());
 
     if ($insert) {
@@ -394,10 +394,10 @@ public function save(array $form, array &$form_state) {
       drupal_set_message(t('@type %title has been updated.', $t_args));
     }
 
-    if ($node->nid) {
-      $form_state['values']['nid'] = $node->nid;
-      $form_state['nid'] = $node->nid;
-      $form_state['redirect'] = node_access('view', $node) ? 'node/' . $node->nid : '<front>';
+    if ($node->nid->value) {
+      $form_state['values']['nid'] = $node->nid->value;
+      $form_state['nid'] = $node->nid->value;
+      $form_state['redirect'] = node_access('view', $node) ? 'node/' . $node->nid->value : '<front>';
     }
     else {
       // In the unlikely case something went wrong on save, the node will be
@@ -420,6 +420,6 @@ public function delete(array $form, array &$form_state) {
       unset($_GET['destination']);
     }
     $node = $this->getEntity($form_state);
-    $form_state['redirect'] = array('node/' . $node->nid . '/delete', array('query' => $destination));
+    $form_state['redirect'] = array('node/' . $node->nid->value . '/delete', array('query' => $destination));
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/NodeStorageController.php b/core/modules/node/lib/Drupal/node/NodeStorageController.php
index 02e694e..7a7f724 100644
--- a/core/modules/node/lib/Drupal/node/NodeStorageController.php
+++ b/core/modules/node/lib/Drupal/node/NodeStorageController.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\node;
 
-use Drupal\Core\Entity\DatabaseStorageController;
+use Drupal\Core\Entity\DatabaseStorageControllerNG;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityStorageException;
 use Exception;
@@ -18,7 +18,7 @@
  * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding
  * required special handling for node entities.
  */
-class NodeStorageController extends DatabaseStorageController {
+class NodeStorageController extends DatabaseStorageControllerNG {
 
   /**
    * Overrides Drupal\Core\Entity\DatabaseStorageController::create().
@@ -27,7 +27,7 @@ public function create(array $values) {
     $node = parent::create($values);
 
     // Set the created time to now.
-    if (empty($node->created)) {
+    if (empty($node->created->value)) {
       $node->created = REQUEST_TIME;
     }
 
@@ -93,35 +93,45 @@ public function save(EntityInterface $entity) {
       $this->preSave($entity);
       $this->invokeHook('presave', $entity);
 
-      if ($entity->isNew()) {
-        $op = 'insert';
-        $return = drupal_write_record($this->entityInfo['base table'], $entity);
-        $entity->enforceIsNew(FALSE);
-      }
-      else {
-        $op = 'update';
+      // Create the storage record to be saved.
+      $record = $this->maptoStorageRecord($entity);
+      // Update the original values so that the compatibility mode works with
+      // the update values, what is required by field API attachers.
+      // @todo Once field API has been converted to use the Field API, move
+      // this after insert/update hooks.
+      $entity->updateOriginalValues();
+
+
+      if (!$entity->isNew()) {
         // Update the base node table, but only if this revision is marked as
         // the default.
         if ($entity->isDefaultRevision()) {
-          $return = drupal_write_record($this->entityInfo['base table'], $entity, $this->idKey);
+          $return = drupal_write_record($this->entityInfo['base table'], $record, $this->idKey);
         }
         else {
           // @todo, should a different value be returned when saving an entity
           // with $isDefaultRevision = FALSE?
           $return = FALSE;
         }
+        $this->resetCache(array($entity->id()));
+        $this->postSave($entity, TRUE);
+        $this->invokeHook('update', $entity);
+      }
+      else {
+        $return = drupal_write_record($this->entityInfo['base table'], $record);
+        // Reset general caches, but keep caches specific to certain entities.
+        $this->resetCache(array());
+
+        $entity->{$this->idKey}->value = $record->{$this->idKey};
+        $entity->enforceIsNew(FALSE);
+        $this->postSave($entity, FALSE);
+        $this->invokeHook('insert', $entity);
       }
 
       if ($this->revisionKey) {
         $this->saveRevision($entity);
       }
 
-      // Reset general caches, but keep caches specific to certain entities.
-      $this->resetCache($op == 'update' ? array($entity->{$this->idKey}): array());
-
-      $this->postSave($entity, $op == 'update');
-      $this->invokeHook($op, $entity);
-
       // Ignore slave server temporarily.
       db_ignore_slave();
       unset($entity->original);
@@ -143,8 +153,16 @@ public function save(EntityInterface $entity) {
    */
   protected function saveRevision(EntityInterface $entity) {
     $record = clone $entity;
-    $record->uid = $entity->revision_uid;
-    $record->timestamp = $entity->revision_timestamp;
+    $record->uid = $entity->revision_uid->value;
+    $record->timestamp = $entity->revision_timestamp->value->getTimestamp();
+
+    // Create the storage record to be saved.
+    $record = $this->maptoStorageRecord($record);
+    // Update the original values so that the compatibility mode works with
+    // the update values, what is required by field API attachers.
+    // @todo Once field API has been converted to use the Field API, move
+    // this after insert/update hooks.
+    $entity->updateOriginalValues();
 
     if (empty($entity->{$this->revisionKey}) || !empty($entity->revision)) {
       drupal_write_record($this->revisionTable, $record);
@@ -166,12 +184,12 @@ protected function saveRevision(EntityInterface $entity) {
   /**
    * Overrides Drupal\Core\Entity\DatabaseStorageController::attachLoad().
    */
-  protected function attachLoad(&$nodes, $load_revision = FALSE) {
+  protected function attachLoad(&$records, $load_revision = FALSE) {
     // Create an array of nodes for each content type and pass this to the
     // object type specific callback.
     $typed_nodes = array();
-    foreach ($nodes as $id => $entity) {
-      $typed_nodes[$entity->type][$id] = $entity;
+    foreach ($records as $key => $record) {
+      $typed_nodes[$record->type][$key] = $record;
     }
 
     // Call object type specific callbacks on each typed array of nodes.
@@ -186,7 +204,7 @@ protected function attachLoad(&$nodes, $load_revision = FALSE) {
     // hook_node_load(), containing a list of node types that were loaded.
     $argument = array_keys($typed_nodes);
     $this->hookLoadArguments = array($argument);
-    parent::attachLoad($nodes, $load_revision);
+    parent::attachLoad($records, $load_revision);
   }
 
   /**
@@ -197,9 +215,8 @@ protected function buildQuery($ids, $revision_id = FALSE) {
     // alias timestamp to revision_timestamp and add revision_uid.
     $query = parent::buildQuery($ids, $revision_id);
     $fields =& $query->getFields();
-    unset($fields['timestamp']);
-    $query->addField('revision', 'timestamp', 'revision_timestamp');
-    $fields['uid']['table'] = 'base';
+    $query->addField('revision', 'changed', 'revision_timestamp');
+    $fields['uid']['table'] = 'data';
     $query->addField('revision', 'uid', 'revision_uid');
     return $query;
   }
@@ -229,11 +246,11 @@ protected function invokeHook($hook, EntityInterface $node) {
         // empty string in that case.
         // @todo: Make the {node_revision}.log column nullable so that we can
         // remove this check.
-        if (!isset($node->log)) {
+        if (!isset($node->log->value)) {
           $node->log = '';
         }
       }
-      elseif (!isset($node->log) || $node->log === '') {
+      elseif (!isset($node->log->value) || $node->log->value === '') {
         // If we are updating an existing node without adding a new revision, we
         // need to make sure $node->log is unset whenever it is empty. As long as
         // $node->log is unset, drupal_write_record() will not attempt to update
@@ -246,8 +263,8 @@ protected function invokeHook($hook, EntityInterface $node) {
       // When saving a new node revision, unset any existing $node->vid so as to
       // ensure that a new revision will actually be created, then store the old
       // revision ID in a separate property for use by node hook implementations.
-      if (!$node->isNew() && !empty($node->revision) && $node->vid) {
-        $node->old_vid = $node->vid;
+      if (!$node->isNew() && !empty($node->revision) && $node->vid->value) {
+        $node->old_vid = $node->vid->value;
         $node->vid = NULL;
       }
     }
@@ -263,7 +280,7 @@ protected function preSave(EntityInterface $node) {
     if ($this->revisionKey && !empty($node->revision)) {
       $node->revision_timestamp = REQUEST_TIME;
 
-      if (!isset($node->revision_uid)) {
+      if (!isset($node->revision_uid->value)) {
         $node->revision_uid = $GLOBALS['user']->uid;
       }
     }
@@ -286,7 +303,7 @@ function postSave(EntityInterface $node, $update) {
   function preDelete($entities) {
     if (module_exists('search')) {
       foreach ($entities as $id => $entity) {
-        search_reindex($entity->nid, 'node');
+        search_reindex($entity->nid->value, 'node');
       }
     }
   }
@@ -305,4 +322,125 @@ protected function postDelete($nodes) {
       ->condition('nid', $ids, 'IN')
       ->execute();
   }
+
+  /**
+   * Implements Drupal\Core\Entity\DatabaseStorageController::baseFieldDefinitions().
+   */
+  public function baseFieldDefinitions() {
+    $properties['nid'] = array(
+      'label' => t('ID'),
+      'description' => t('The node ID.'),
+      'type' => 'integer_field',
+      'read-only' => TRUE,
+      'list' => FALSE,
+    );
+    $properties['uuid'] = array(
+      'label' => t('UUID'),
+      'description' => t('The node UUID.'),
+      'type' => 'string_field',
+      'read-only' => TRUE,
+      'list' => FALSE,
+    );
+    $properties['vid'] = array(
+      'label' => t('Revision ID'),
+      'description' => t('The ID of the node revision.'),
+      'type' => 'integer_field',
+      'read-only' => TRUE,
+      'list' => FALSE,
+    );
+    $properties['langcode'] = array(
+      'label' => t('Language code'),
+      'description' => t('The node language code.'),
+      'type' => 'language_field',
+      'list' => FALSE,
+    );
+    $properties['title'] = array(
+      'label' => t('Title'),
+      'description' => t('The title.'),
+      'type' => 'string_field',
+      'list' => FALSE,
+    );
+    $properties['uid'] = array(
+      'label' => t('User ID'),
+      'description' => t('The user ID of the node author.'),
+      'type' => 'entityreference_field',
+      'settings' => array('entity type' => 'user'),
+      'list' => FALSE,
+    );
+    $properties['created'] = array(
+      'label' => t('Created'),
+      'description' => t('The time that the node was created.'),
+      'type' => 'date_field',
+      'list' => FALSE,
+    );
+    $properties['changed'] = array(
+      'label' => t('Changed'),
+      'description' => t('The time that the node was last edited.'),
+      'type' => 'date_field',
+      'list' => FALSE,
+    );
+    $properties['revision_timestamp'] = array(
+      'label' => t('Revision Timestamp'),
+      'description' => t('The time that this revision was last edited.'),
+      'type' => 'date_field',
+      'list' => FALSE,
+    );
+    $properties['revision_uid'] = array(
+      'label' => t('Revision User ID'),
+      'description' => t('The user ID of the node revision author.'),
+      'type' => 'entityreference_field',
+      'settings' => array('entity type' => 'user'),
+      'list' => FALSE,
+    );
+    $properties['status'] = array(
+      'label' => t('Publishing status'),
+      'description' => t('A boolean indicating whether the node is published.'),
+      'type' => 'boolean_field',
+      'list' => FALSE,
+    );
+    $properties['sticky'] = array(
+      'label' => t('Sticky'),
+      'description' => t('Indicates whether the node should be displayed at the top of lists in which it appears.'),
+      'type' => 'boolean_field',
+      'list' => FALSE,
+    );
+    $properties['promote'] = array(
+      'label' => t('Promote to frontpage'),
+      'description' => t('Indicates whether the node should be displayed on the front page.'),
+      'type' => 'boolean_field',
+      'list' => FALSE,
+    );
+    $properties['comment'] = array(
+      'label' => t('Comment status'),
+      'description' => t('Whether comments are allowed on this node.'),
+      'type' => 'boolean_field',
+      'list' => FALSE,
+    );
+    $properties['type'] = array(
+      'label' => t('Node type'),
+      'description' => t("The node type."),
+      'type' => 'string_field',
+      'list' => FALSE,
+    );
+    $properties['tnid'] = array(
+      'label' => t('Translation set ID'),
+      'description' => t("The translation set id for this node, which equals the node id of the source post in each set."),
+      'type' => 'integer_field',
+      'read-only' => TRUE,
+      'list' => FALSE,
+    );
+    $properties['translate'] = array(
+      'label' => t('Translation status'),
+      'description' => t("Indicates whether this translation page needs to be updated."),
+      'type' => 'boolean_field',
+      'list' => FALSE,
+    );
+    $properties['log'] = array(
+      'label' => t('Revision log'),
+      'description' => t("The log entry explaining the changes in this version."),
+      'type' => 'string_field',
+      'list' => FALSE,
+    );
+    return $properties;
+  }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php
index 8dd2ab6..c506702 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php
@@ -59,12 +59,12 @@ function testNodeAccessAdministerField() {
 
     // Log in as the administrator and confirm that the field value is present.
     $this->drupalLogin($this->admin_user);
-    $this->drupalGet("node/{$node->nid}");
+    $this->drupalGet("node/{$node->nid->value}");
     $this->assertText($value, 'The saved field value is visible to an administrator.');
 
     // Log in as the content admin and try to view the node.
     $this->drupalLogin($this->content_admin_user);
-    $this->drupalGet("node/{$node->nid}");
+    $this->drupalGet("node/{$node->nid->value}");
     $this->assertText('Access denied', 'Access is denied for the content admin.');
 
     // Modify the field default as the content admin.
@@ -81,7 +81,7 @@ function testNodeAccessAdministerField() {
     $this->drupalLogin($this->admin_user);
 
     // Confirm that the existing node still has the correct field value.
-    $this->drupalGet("node/{$node->nid}");
+    $this->drupalGet("node/{$node->nid->value}");
     $this->assertText($value, 'The original field value is visible to an administrator.');
 
     // Confirm that the new default value appears when creating a new node.
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php
index 021e228..4a9cdc7 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php
@@ -65,7 +65,7 @@ function testNodeAccess() {
     // Tests the default access provided for a published Hungarian node.
     $web_user = $this->drupalCreateUser(array('access content'));
     $node = $this->drupalCreateNode(array('body' => array('hu' => array(array())), 'langcode' => 'hu'));
-    $this->assertTrue($node->langcode == 'hu', 'Node created as Hungarian.');
+    $this->assertTrue($node->langcode->value == 'hu', 'Node created as Hungarian.');
     $expected_node_access = array('view' => TRUE, 'update' => FALSE, 'delete' => FALSE);
     $this->assertNodeAccess($expected_node_access, $node, $web_user);
 
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
index bf8f845..54684be 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
@@ -46,7 +46,7 @@ public function testCommentPager() {
     // Create 60 comments.
     for ($i = 0; $i < 60; $i++) {
       $comment = entity_create('comment', array(
-        'nid' => $node->nid,
+        'nid' => $node->nid->value,
         'subject' => $this->randomName(),
         'comment_body' => array(
           LANGUAGE_NOT_SPECIFIED => array(
@@ -61,7 +61,7 @@ public function testCommentPager() {
 
     // View the node page. With the default 50 comments per page there should
     // be two pages (0, 1) but no third (2) page.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($node->label());
     $this->assertText(t('Comments'));
     $this->assertRaw('page=1');
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php
index 07a00cf..04969d1 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php
@@ -33,41 +33,41 @@ public static function getInfo() {
   function testNodeAccessRecords() {
     // Create an article node.
     $node1 = $this->drupalCreateNode(array('type' => 'article'));
-    $this->assertTrue(node_load($node1->nid), 'Article node created.');
+    $this->assertTrue(node_load($node1->nid->value), 'Article node created.');
 
     // Check to see if grants added by node_test_node_access_records made it in.
-    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node1->nid))->fetchAll();
+    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node1->nid->value))->fetchAll();
     $this->assertEqual(count($records), 1, 'Returned the correct number of rows.');
     $this->assertEqual($records[0]->realm, 'test_article_realm', 'Grant with article_realm acquired for node without alteration.');
     $this->assertEqual($records[0]->gid, 1, 'Grant with gid = 1 acquired for node without alteration.');
 
     // Create an unpromoted "Basic page" node.
     $node2 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 0));
-    $this->assertTrue(node_load($node2->nid), 'Unpromoted basic page node created.');
+    $this->assertTrue(node_load($node2->nid->value), 'Unpromoted basic page node created.');
 
     // Check to see if grants added by node_test_node_access_records made it in.
-    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node2->nid))->fetchAll();
+    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node2->nid->value))->fetchAll();
     $this->assertEqual(count($records), 1, 'Returned the correct number of rows.');
     $this->assertEqual($records[0]->realm, 'test_page_realm', 'Grant with page_realm acquired for node without alteration.');
     $this->assertEqual($records[0]->gid, 1, 'Grant with gid = 1 acquired for node without alteration.');
 
     // Create an unpromoted, unpublished "Basic page" node.
     $node3 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 0, 'status' => 0));
-    $this->assertTrue(node_load($node3->nid), 'Unpromoted, unpublished basic page node created.');
+    $this->assertTrue(node_load($node3->nid->value), 'Unpromoted, unpublished basic page node created.');
 
     // Check to see if grants added by node_test_node_access_records made it in.
-    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node3->nid))->fetchAll();
+    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node3->nid->value))->fetchAll();
     $this->assertEqual(count($records), 1, 'Returned the correct number of rows.');
     $this->assertEqual($records[0]->realm, 'test_page_realm', 'Grant with page_realm acquired for node without alteration.');
     $this->assertEqual($records[0]->gid, 1, 'Grant with gid = 1 acquired for node without alteration.');
 
     // Create a promoted "Basic page" node.
     $node4 = $this->drupalCreateNode(array('type' => 'page', 'promote' => 1));
-    $this->assertTrue(node_load($node4->nid), 'Promoted basic page node created.');
+    $this->assertTrue(node_load($node4->nid->value), 'Promoted basic page node created.');
 
     // Check to see if grant added by node_test_node_access_records was altered
     // by node_test_node_access_records_alter.
-    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node4->nid))->fetchAll();
+    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node4->nid->value))->fetchAll();
     $this->assertEqual(count($records), 1, 'Returned the correct number of rows.');
     $this->assertEqual($records[0]->realm, 'test_alter_realm', 'Altered grant with alter_realm acquired for node.');
     $this->assertEqual($records[0]->gid, 2, 'Altered grant with gid = 2 acquired for node.');
@@ -86,7 +86,7 @@ function testNodeAccessRecords() {
     // Check that core does not grant access to an unpublished node when an
     // empty $grants array is returned.
     $node6 = $this->drupalCreateNode(array('status' => 0, 'disable_node_access' => TRUE));
-    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node6->nid))->fetchAll();
+    $records = db_query('SELECT realm, gid FROM {node_access} WHERE nid = :nid', array(':nid' => $node6->nid->value))->fetchAll();
     $this->assertEqual(count($records), 0, 'Returned no records for unpublished node.');
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php
index 3c02765..c9cdaf8 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php
@@ -90,11 +90,11 @@ function testContentAdminPages() {
     $this->drupalGet('admin/content');
     $this->assertResponse(200);
     foreach ($nodes as $node) {
-      $this->assertLinkByHref('node/' . $node->nid);
-      $this->assertLinkByHref('node/' . $node->nid . '/edit');
-      $this->assertLinkByHref('node/' . $node->nid . '/delete');
+      $this->assertLinkByHref('node/' . $node->nid->value);
+      $this->assertLinkByHref('node/' . $node->nid->value . '/edit');
+      $this->assertLinkByHref('node/' . $node->nid->value . '/delete');
       // Verify tableselect.
-      $this->assertFieldByName('nodes[' . $node->nid . ']', '', 'Tableselect found.');
+      $this->assertFieldByName('nodes[' . $node->nid->value . ']', '', 'Tableselect found.');
     }
 
     // Verify filtering by publishing status.
@@ -105,9 +105,9 @@ function testContentAdminPages() {
 
     $this->assertRaw(t('where %property is %value', array('%property' => t('status'), '%value' => 'published')), 'Content list is filtered by status.');
 
-    $this->assertLinkByHref('node/' . $nodes['published_page']->nid . '/edit');
-    $this->assertLinkByHref('node/' . $nodes['published_article']->nid . '/edit');
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid . '/edit');
+    $this->assertLinkByHref('node/' . $nodes['published_page']->nid->value . '/edit');
+    $this->assertLinkByHref('node/' . $nodes['published_article']->nid->value . '/edit');
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid->value . '/edit');
 
     // Verify filtering by status and content type.
     $edit = array(
@@ -118,46 +118,46 @@ function testContentAdminPages() {
     $this->assertRaw(t('where %property is %value', array('%property' => t('status'), '%value' => 'published')), 'Content list is filtered by status.');
     $this->assertRaw(t('and where %property is %value', array('%property' => t('type'), '%value' => 'Basic page')), 'Content list is filtered by content type.');
 
-    $this->assertLinkByHref('node/' . $nodes['published_page']->nid . '/edit');
-    $this->assertNoLinkByHref('node/' . $nodes['published_article']->nid . '/edit');
+    $this->assertLinkByHref('node/' . $nodes['published_page']->nid->value . '/edit');
+    $this->assertNoLinkByHref('node/' . $nodes['published_article']->nid->value . '/edit');
 
     // Verify no operation links are displayed for regular users.
     $this->drupalLogout();
     $this->drupalLogin($this->base_user_1);
     $this->drupalGet('admin/content');
     $this->assertResponse(200);
-    $this->assertLinkByHref('node/' . $nodes['published_page']->nid);
-    $this->assertLinkByHref('node/' . $nodes['published_article']->nid);
-    $this->assertNoLinkByHref('node/' . $nodes['published_page']->nid . '/edit');
-    $this->assertNoLinkByHref('node/' . $nodes['published_page']->nid . '/delete');
-    $this->assertNoLinkByHref('node/' . $nodes['published_article']->nid . '/edit');
-    $this->assertNoLinkByHref('node/' . $nodes['published_article']->nid . '/delete');
+    $this->assertLinkByHref('node/' . $nodes['published_page']->nid->value);
+    $this->assertLinkByHref('node/' . $nodes['published_article']->nid->value);
+    $this->assertNoLinkByHref('node/' . $nodes['published_page']->nid->value . '/edit');
+    $this->assertNoLinkByHref('node/' . $nodes['published_page']->nid->value . '/delete');
+    $this->assertNoLinkByHref('node/' . $nodes['published_article']->nid->value . '/edit');
+    $this->assertNoLinkByHref('node/' . $nodes['published_article']->nid->value . '/delete');
 
     // Verify no unpublished content is displayed without permission.
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid);
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid . '/edit');
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid . '/delete');
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid->value);
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid->value . '/edit');
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid->value . '/delete');
 
     // Verify no tableselect.
-    $this->assertNoFieldByName('nodes[' . $nodes['published_page']->nid . ']', '', 'No tableselect found.');
+    $this->assertNoFieldByName('nodes[' . $nodes['published_page']->nid->value . ']', '', 'No tableselect found.');
 
     // Verify unpublished content is displayed with permission.
     $this->drupalLogout();
     $this->drupalLogin($this->base_user_2);
     $this->drupalGet('admin/content');
     $this->assertResponse(200);
-    $this->assertLinkByHref('node/' . $nodes['unpublished_page_2']->nid);
+    $this->assertLinkByHref('node/' . $nodes['unpublished_page_2']->nid->value);
     // Verify no operation links are displayed.
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_2']->nid . '/edit');
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_2']->nid . '/delete');
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_2']->nid->value . '/edit');
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_2']->nid->value . '/delete');
 
     // Verify user cannot see unpublished content of other users.
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid);
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid . '/edit');
-    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid . '/delete');
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid->value);
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid->value . '/edit');
+    $this->assertNoLinkByHref('node/' . $nodes['unpublished_page_1']->nid->value . '/delete');
 
     // Verify no tableselect.
-    $this->assertNoFieldByName('nodes[' . $nodes['unpublished_page_2']->nid . ']', '', 'No tableselect found.');
+    $this->assertNoFieldByName('nodes[' . $nodes['unpublished_page_2']->nid->value . ']', '', 'No tableselect found.');
 
     // Verify node access can be bypassed.
     $this->drupalLogout();
@@ -165,9 +165,9 @@ function testContentAdminPages() {
     $this->drupalGet('admin/content');
     $this->assertResponse(200);
     foreach ($nodes as $node) {
-      $this->assertLinkByHref('node/' . $node->nid);
-      $this->assertLinkByHref('node/' . $node->nid . '/edit');
-      $this->assertLinkByHref('node/' . $node->nid . '/delete');
+      $this->assertLinkByHref('node/' . $node->nid->value);
+      $this->assertLinkByHref('node/' . $node->nid->value . '/edit');
+      $this->assertLinkByHref('node/' . $node->nid->value . '/delete');
     }
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php
index edcb007..3a6929e 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php
@@ -76,13 +76,13 @@ function testRecentNodeBlock() {
       ->fields(array(
         'changed' => $node1->changed + 100,
       ))
-      ->condition('nid', $node2->nid)
+      ->condition('nid', $node2->nid->value)
       ->execute();
     db_update('node')
       ->fields(array(
         'changed' => $node1->changed + 200,
       ))
-      ->condition('nid', $node3->nid)
+      ->condition('nid', $node3->nid->value)
       ->execute();
 
     // Test that a user without the 'access content' permission cannot
@@ -142,7 +142,7 @@ function testRecentNodeBlock() {
     $this->assertNoText($custom_block['title'], 'Block was displayed on the front page.');
     $this->drupalGet('node/add/article');
     $this->assertText($custom_block['title'], 'Block was displayed on the node/add/article page.');
-    $this->drupalGet('node/' . $node1->nid);
+    $this->drupalGet('node/' . $node1->nid->value);
     $this->assertText($custom_block['title'], 'Block was displayed on the node/N.');
 
     // Delete the created custom block & verify that it's been deleted.
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php
index 838f855..930fe85 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php
@@ -89,7 +89,7 @@ function testMultilingualNodeForm() {
     $this->assertTrue($assert, 'Field language correctly set.');
 
     // Change node language.
-    $this->drupalGet("node/$node->nid/edit");
+    $this->drupalGet("node/{$node->nid->value}/edit");
     $edit = array(
       $title_key => $this->randomName(8),
       'langcode' => 'it'
@@ -105,10 +105,10 @@ function testMultilingualNodeForm() {
     language_negotiation_set(LANGUAGE_TYPE_CONTENT, array(LANGUAGE_NEGOTIATION_URL => 0));
 
     // Test multilingual field language fallback logic.
-    $this->drupalGet("it/node/$node->nid");
+    $this->drupalGet("it/node/{$node->nid->value}");
     $this->assertRaw($body_value, 'Body correctly displayed using Italian as requested language');
 
-    $this->drupalGet("node/$node->nid");
+    $this->drupalGet("node/{$node->nid->value}");
     $this->assertRaw($body_value, 'Body correctly displayed using English as requested language');
   }
 
@@ -134,9 +134,9 @@ function testMultilingualDisplaySettings() {
     $this->assertTrue($node, 'Node found in database.');
 
     // Check if node body is showed.
-    $this->drupalGet("node/$node->nid");
+    $this->drupalGet("node/{$node->nid->value}");
     $body = $this->xpath('//article[@id=:id]//div[@class=:class]/descendant::p', array(
-      ':id' => 'node-' . $node->nid,
+      ':id' => 'node-' . $node->nid->value,
       ':class' => 'content',
     ));
     $this->assertEqual(current($body), $node->body['en'][0]['value'], 'Node body found.');
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeLoadHooksTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeLoadHooksTest.php
index 5ca7ed6..5f6d5af 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeLoadHooksTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeLoadHooksTest.php
@@ -42,7 +42,7 @@ function testHookNodeLoad() {
     // reflect the expected values.
     $nodes = entity_load_multiple_by_properties('node', array('status' => NODE_PUBLISHED));
     $loaded_node = end($nodes);
-    $this->assertEqual($loaded_node->node_test_loaded_nids, array($node1->nid, $node2->nid), t('hook_node_load() received the correct list of node IDs the first time it was called.'));
+    $this->assertEqual($loaded_node->node_test_loaded_nids, array($node1->nid->value, $node2->nid->value), t('hook_node_load() received the correct list of node IDs the first time it was called.'));
     $this->assertEqual($loaded_node->node_test_loaded_types, array('article'), t('hook_node_load() received the correct list of node types the first time it was called.'));
 
     // Now, as part of the same page request, load a set of nodes that contain
@@ -50,7 +50,7 @@ function testHookNodeLoad() {
     // node_test_node_load() are correctly updated.
     $nodes = entity_load_multiple_by_properties('node', array('status' => NODE_NOT_PUBLISHED));
     $loaded_node = end($nodes);
-    $this->assertEqual($loaded_node->node_test_loaded_nids, array($node3->nid, $node4->nid), t('hook_node_load() received the correct list of node IDs the second time it was called.'));
+    $this->assertEqual($loaded_node->node_test_loaded_nids, array($node3->nid->value, $node4->nid->value), t('hook_node_load() received the correct list of node IDs the second time it was called.'));
     $this->assertEqual($loaded_node->node_test_loaded_types, array('article', 'page'), t('hook_node_load() received the correct list of node types the second time it was called.'));
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php
index 815ab1b..b17618a 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php
@@ -44,8 +44,8 @@ function testNodeMultipleLoad() {
 
     // Load nodes with only a condition. Nodes 3 and 4 will be loaded.
     $nodes = entity_load_multiple_by_properties('node', array('promote' => 0));
-    $this->assertEqual($node3->label(), $nodes[$node3->nid]->label(), 'Node was loaded.');
-    $this->assertEqual($node4->label(), $nodes[$node4->nid]->label(), 'Node was loaded.');
+    $this->assertEqual($node3->label(), $nodes[$node3->nid->value]->label(), 'Node was loaded.');
+    $this->assertEqual($node4->label(), $nodes[$node4->nid->value]->label(), 'Node was loaded.');
     $count = count($nodes);
     $this->assertTrue($count == 2, t('@count nodes loaded.', array('@count' => $count)));
 
@@ -53,9 +53,9 @@ function testNodeMultipleLoad() {
     $nodes = node_load_multiple(array(1, 2, 4));
     $count = count($nodes);
     $this->assertTrue(count($nodes) == 3, t('@count nodes loaded', array('@count' => $count)));
-    $this->assertTrue(isset($nodes[$node1->nid]), 'Node is correctly keyed in the array');
-    $this->assertTrue(isset($nodes[$node2->nid]), 'Node is correctly keyed in the array');
-    $this->assertTrue(isset($nodes[$node4->nid]), 'Node is correctly keyed in the array');
+    $this->assertTrue(isset($nodes[$node1->nid->value]), 'Node is correctly keyed in the array');
+    $this->assertTrue(isset($nodes[$node2->nid->value]), 'Node is correctly keyed in the array');
+    $this->assertTrue(isset($nodes[$node4->nid->value]), 'Node is correctly keyed in the array');
     foreach ($nodes as $node) {
       $this->assertTrue(is_object($node), 'Node is an object');
     }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php
index e82ebcd..f6453e0 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php
@@ -52,18 +52,18 @@ function testNodeRSSContent() {
     $this->drupalGet('rss.xml');
 
     // Check that content added in 'rss' view mode appear in RSS feed.
-    $rss_only_content = t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->nid));
+    $rss_only_content = t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->nid->value));
     $this->assertText($rss_only_content, 'Node content designated for RSS appear in RSS feed.');
 
     // Check that content added in view modes other than 'rss' doesn't
     // appear in RSS feed.
-    $non_rss_content = t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->nid));
+    $non_rss_content = t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->nid->value));
     $this->assertNoText($non_rss_content, t('Node content not designed for RSS doesn\'t appear in RSS feed.'));
 
     // Check that extra RSS elements and namespaces are added to RSS feed.
     $test_element = array(
       'key' => 'testElement',
-      'value' => t('Value of testElement RSS element for node !nid.', array('!nid' => $node->nid)),
+      'value' => t('Value of testElement RSS element for node !nid.', array('!nid' => $node->nid->value)),
     );
     $test_ns = 'xmlns:drupaltest="http://example.com/test-namespace"';
     $this->assertRaw(format_xml_elements(array($test_element)), 'Extra RSS elements appear in RSS feed.');
@@ -71,7 +71,7 @@ function testNodeRSSContent() {
 
     // Check that content added in 'rss' view mode doesn't appear when
     // viewing node.
-    $this->drupalGet("node/$node->nid");
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertNoText($rss_only_content, t('Node content designed for RSS doesn\'t appear when viewing node.'));
 
     // Check that the node feed page does not try to interpret additional path
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionPermissionsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionPermissionsTest.php
index 9a5bb56..495b5a3 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionPermissionsTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionPermissionsTest.php
@@ -75,7 +75,7 @@ function setUp() {
    * Tests the _node_revision_access() function.
    */
   function testNodeRevisionAccess() {
-    $revision = node_revision_load($this->node_revisions[1]->vid);
+    $revision = node_revision_load($this->node_revisions[1]->vid->value);
 
     $parameters = array(
       'op' => array_keys($this->map),
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php
index 5a40510..39e96db 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php
@@ -46,7 +46,7 @@ function setUp() {
 
       // Create revision with random title and body and update variables.
       $this->drupalCreateNode($settings);
-      $node = node_load($node->nid); // Make sure we get revision information.
+      $node = node_load($node->nid->value); // Make sure we get revision information.
       $settings = get_object_vars($node);
       $settings['isDefaultRevision'] = TRUE;
 
@@ -68,11 +68,11 @@ function testRevisions() {
     $node = $nodes[3];
 
     // Confirm the correct revision text appears on "view revisions" page.
-    $this->drupalGet("node/$node->nid/revisions/$node->vid/view");
+    $this->drupalGet("node/{$node->nid->value}/revisions/{$node->vid->value}/view");
     $this->assertText($node->body[LANGUAGE_NOT_SPECIFIED][0]['value'], 'Correct text displays for version.');
 
     // Confirm the correct log message appears on "revisions overview" page.
-    $this->drupalGet("node/$node->nid/revisions");
+    $this->drupalGet("node/{$node->nid->value}/revisions");
     foreach ($logs as $log) {
       $this->assertText($log, 'Log message found.');
     }
@@ -81,34 +81,34 @@ function testRevisions() {
     $this->assertTrue($node->isDefaultRevision(), 'Third node revision is the default one.');
 
     // Confirm that revisions revert properly.
-    $this->drupalPost("node/$node->nid/revisions/{$nodes[1]->vid}/revert", array(), t('Revert'));
+    $this->drupalPost("node/{$node->nid->value}/revisions/{$nodes[1]->vid->value}/revert", array(), t('Revert'));
     $this->assertRaw(t('@type %title has been reverted back to the revision from %revision-date.',
                         array('@type' => 'Basic page', '%title' => $nodes[1]->label(),
-                              '%revision-date' => format_date($nodes[1]->revision_timestamp))), t('Revision reverted.'));
-    $reverted_node = node_load($node->nid);
+                              '%revision-date' => format_date($nodes[1]->revision_timestamp->value->getTimestamp()))), t('Revision reverted.'));
+    $reverted_node = node_load($node->nid->value);
     $this->assertTrue(($nodes[1]->body[LANGUAGE_NOT_SPECIFIED][0]['value'] == $reverted_node->body[LANGUAGE_NOT_SPECIFIED][0]['value']), 'Node reverted correctly.');
 
     // Confirm that this is not the default version.
-    $node = node_revision_load($node->vid);
+    $node = node_revision_load($node->vid->value);
     $this->assertFalse($node->isDefaultRevision(), 'Third node revision is not the default one.');
 
     // Confirm revisions delete properly.
-    $this->drupalPost("node/$node->nid/revisions/{$nodes[1]->vid}/delete", array(), t('Delete'));
+    $this->drupalPost("node/{$node->nid->value}/revisions/{$nodes[1]->vid->value}/delete", array(), t('Delete'));
     $this->assertRaw(t('Revision from %revision-date of @type %title has been deleted.',
-                        array('%revision-date' => format_date($nodes[1]->revision_timestamp),
+                        array('%revision-date' => format_date($nodes[1]->revision_timestamp->value->getTimestamp()),
                               '@type' => 'Basic page', '%title' => $nodes[1]->label())), t('Revision deleted.'));
-    $this->assertTrue(db_query('SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid and vid = :vid', array(':nid' => $node->nid, ':vid' => $nodes[1]->vid))->fetchField() == 0, 'Revision not found.');
+    $this->assertTrue(db_query('SELECT COUNT(vid) FROM {node_property_data_revision} WHERE nid = :nid and vid = :vid', array(':nid' => $node->nid->value, ':vid' => $nodes[1]->vid->value))->fetchField() == 0, 'Revision not found.');
 
     // Set the revision timestamp to an older date to make sure that the
     // confirmation message correctly displays the stored revision date.
     $old_revision_date = REQUEST_TIME - 86400;
-    db_update('node_revision')
-      ->condition('vid', $nodes[2]->vid)
+    db_update('node_property_data_revision')
+      ->condition('vid', $nodes[2]->vid->value)
       ->fields(array(
-        'timestamp' => $old_revision_date,
+        'changed' => $old_revision_date,
       ))
       ->execute();
-    $this->drupalPost("node/$node->nid/revisions/{$nodes[2]->vid}/revert", array(), t('Revert'));
+    $this->drupalPost("node/{$node->nid->value}/revisions/{$nodes[2]->vid->value}/revert", array(), t('Revert'));
     $this->assertRaw(t('@type %title has been reverted back to the revision from %revision-date.', array(
       '@type' => 'Basic page',
       '%title' => $nodes[2]->label(),
@@ -125,22 +125,22 @@ function testRevisions() {
     $new_node_revision->isDefaultRevision = FALSE;
     node_save($new_node_revision);
 
-    $this->drupalGet("node/$node->nid");
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertNoText($new_body, 'Revision body text is not present on default version of node.');
 
     // Verify that the new body text is present on the revision.
-    $this->drupalGet("node/$node->nid/revisions/" . $new_node_revision->vid . "/view");
+    $this->drupalGet('node/' . $node->nid->value . '/revisions/' . $new_node_revision->vid->value . "/view");
     $this->assertText($new_body, 'Revision body text is present when loading specific revision.');
 
     // Verify that the non-default revision vid is greater than the default
     // revision vid.
     $default_revision = db_select('node', 'n')
       ->fields('n', array('vid'))
-      ->condition('nid', $node->nid)
+      ->condition('nid', $node->nid->value)
       ->execute()
       ->fetchCol();
     $default_revision_vid = $default_revision[0];
-    $this->assertTrue($new_node_revision->vid > $default_revision_vid, 'Revision vid is greater than default revision vid.');
+    $this->assertTrue($new_node_revision->vid->value > $default_revision_vid, 'Revision vid is greater than default revision vid.');
   }
 
   /**
@@ -163,10 +163,10 @@ function testNodeRevisionWithoutLogMessage() {
     $node->revision = FALSE;
 
     $node->save();
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($new_title, 'New node title appears on the page.');
-    $node_revision = node_load($node->nid, TRUE);
-    $this->assertEqual($node_revision->log, $log, 'After an existing node revision is re-saved without a log message, the original log message is preserved.');
+    $node_revision = node_load($node->nid->value, TRUE);
+    $this->assertEqual($node_revision->log->value, $log, 'After an existing node revision is re-saved without a log message, the original log message is preserved.');
 
     // Create another node with an initial log message.
     $node = $this->drupalCreateNode(array('log' => $log));
@@ -181,9 +181,9 @@ function testNodeRevisionWithoutLogMessage() {
     $node->log = NULL;
 
     $node->save();
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($new_title, 'New node title appears on the page.');
-    $node_revision = node_load($node->nid, TRUE);
-    $this->assertTrue(empty($node_revision->log), 'After a new node revision is saved with an empty log message, the log message for the node is empty.');
+    $node_revision = node_load($node->nid->value, TRUE);
+    $this->assertTrue(empty($node_revision->log->value), 'After a new node revision is saved with an empty log message, the log message for the node is empty.');
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php
index f269bf3..de930b0 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php
@@ -59,7 +59,7 @@ function testImport() {
     $node = node_submit(entity_create('node', $node));
 
     // Verify that node_submit did not overwrite the user ID.
-    $this->assertEqual($node->uid, $this->web_user->uid, t('Function node_submit() preserves user ID'));
+    $this->assertEqual($node->uid->value, $this->web_user->uid, t('Function node_submit() preserves user ID'));
 
     $node->save();
     // Test the import.
@@ -84,24 +84,24 @@ function testTimestamps() {
 
     entity_create('node', $edit)->save();
     $node = $this->drupalGetNodeByTitle($edit['title']);
-    $this->assertEqual($node->created, REQUEST_TIME, 'Creating a node sets default "created" timestamp.');
-    $this->assertEqual($node->changed, REQUEST_TIME, 'Creating a node sets default "changed" timestamp.');
+    $this->assertEqual($node->created->value->getTimestamp(), REQUEST_TIME, 'Creating a node sets default "created" timestamp.');
+    $this->assertEqual($node->changed->value->getTimestamp(), REQUEST_TIME, 'Creating a node sets default "changed" timestamp.');
 
     // Store the timestamps.
-    $created = $node->created;
-    $changed = $node->changed;
+    $created = $node->created->value->getTimestamp();
+    $changed = $node->changed->value->getTimestamp();
 
     $node->save();
     $node = $this->drupalGetNodeByTitle($edit['title'], TRUE);
-    $this->assertEqual($node->created, $created, 'Updating a node preserves "created" timestamp.');
+    $this->assertEqual($node->created->value->getTimestamp(), $created, 'Updating a node preserves "created" timestamp.');
 
     // Programmatically set the timestamps using hook_node_presave.
     $node->title = 'testing_node_presave';
 
     $node->save();
     $node = $this->drupalGetNodeByTitle('testing_node_presave', TRUE);
-    $this->assertEqual($node->created, 280299600, 'Saving a node uses "created" timestamp set in presave hook.');
-    $this->assertEqual($node->changed, 979534800, 'Saving a node uses "changed" timestamp set in presave hook.');
+    $this->assertEqual($node->created->value->getTimestamp(), 280299600, 'Saving a node uses "created" timestamp set in presave hook.');
+    $this->assertEqual($node->changed->value->getTimestamp(), 979534800, 'Saving a node uses "changed" timestamp set in presave hook.');
 
     // Programmatically set the timestamps on the node.
     $edit = array(
@@ -114,8 +114,8 @@ function testTimestamps() {
 
     entity_create('node', $edit)->save();
     $node = $this->drupalGetNodeByTitle($edit['title']);
-    $this->assertEqual($node->created, 280299600, 'Creating a node uses user-set "created" timestamp.');
-    $this->assertNotEqual($node->changed, 979534800, t('Creating a node doesn\'t use user-set "changed" timestamp.'));
+    $this->assertEqual($node->created->value->getTimestamp(), 280299600, 'Creating a node uses user-set "created" timestamp.');
+    $this->assertNotEqual($node->changed->value->getTimestamp(), 979534800, t('Creating a node doesn\'t use user-set "changed" timestamp.'));
 
     // Update the timestamps.
     $node->created = 979534800;
@@ -123,8 +123,8 @@ function testTimestamps() {
 
     $node->save();
     $node = $this->drupalGetNodeByTitle($edit['title'], TRUE);
-    $this->assertEqual($node->created, 979534800, 'Updating a node uses user-set "created" timestamp.');
-    $this->assertNotEqual($node->changed, 280299600, t('Updating a node doesn\'t use user-set "changed" timestamp.'));
+    $this->assertEqual($node->created->value->getTimestamp(), 979534800, 'Updating a node uses user-set "created" timestamp.');
+    $this->assertNotEqual($node->changed->value->getTimestamp(), 280299600, t('Updating a node doesn\'t use user-set "changed" timestamp.'));
   }
 
   /**
@@ -153,7 +153,7 @@ function testDeterminingChanges() {
     $this->assertEqual($node->label(), 'updated_presave_update', 'Changes have been determined.');
 
     // Test the static node load cache to be cleared.
-    $node = node_load($node->nid);
+    $node = node_load($node->nid->value);
     $this->assertEqual($node->label(), 'updated_presave', 'Static cache has been cleared.');
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php
index 1880d4f..6be2a80 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php
@@ -49,17 +49,17 @@ function testNodeTitle() {
     $node = $this->drupalCreateNode($settings);
 
     // Test <title> tag.
-    $this->drupalGet("node/$node->nid");
+    $this->drupalGet('node/' . $node->nid->value);
     $xpath = '//title';
     $this->assertEqual(current($this->xpath($xpath)), $node->label() .' | Drupal', 'Page title is equal to node title.', 'Node');
 
     // Test breadcrumb in comment preview.
-    $this->drupalGet("comment/reply/$node->nid");
+    $this->drupalGet('comment/reply/' . $node->nid->value);
     $xpath = '//nav[@class="breadcrumb"]/ol/li[last()]/a';
     $this->assertEqual(current($this->xpath($xpath)), $node->label(), 'Node breadcrumb is equal to node title.', 'Node');
 
     // Test node title in comment preview.
-    $this->assertEqual(current($this->xpath('//article[@id=:id]/h2/a', array(':id' => 'node-' . $node->nid))), $node->label(), 'Node preview title is equal to node title.', 'Node');
+    $this->assertEqual(current($this->xpath('//article[@id=:id]/h2/a', array(':id' => 'node-' . $node->nid->value))), $node->label(), 'Node preview title is equal to node title.', 'Node');
 
     // Test node title is clickable on teaser list (/node).
     $this->drupalGet('node');
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php
index af30e19..8e66b58 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php
@@ -31,12 +31,12 @@ function testNodeTitleXSS() {
     $settings = array('title' => $title);
     $node = $this->drupalCreateNode($settings);
 
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     // assertTitle() decodes HTML-entities inside the <title> element.
     $this->assertTitle($edit["title"] . ' | Drupal', 'Title is diplayed when viewing a node.');
     $this->assertNoRaw($xss, 'Harmful tags are escaped when viewing a node.');
 
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertNoRaw($xss, 'Harmful tags are escaped when editing a node.');
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php
index 0b5f81d..c83efd0 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php
@@ -40,27 +40,27 @@ function testNodeTokenReplacement() {
     $node = $this->drupalCreateNode($settings);
 
     // Load node so that the body and summary fields are structured properly.
-    $node = node_load($node->nid);
-    $instance = field_info_instance('node', 'body', $node->type);
+    $node = node_load($node->nid->value);
+    $instance = field_info_instance('node', 'body', $node->type->value);
 
     // Generate and test sanitized tokens.
     $tests = array();
-    $tests['[node:nid]'] = $node->nid;
-    $tests['[node:vid]'] = $node->vid;
-    $tests['[node:tnid]'] = $node->tnid;
+    $tests['[node:nid]'] = $node->nid->value;
+    $tests['[node:vid]'] = $node->vid->value;
+    $tests['[node:tnid]'] = $node->tnid->value;
     $tests['[node:type]'] = 'article';
     $tests['[node:type-name]'] = 'Article';
-    $tests['[node:title]'] = check_plain($node->title);
-    $tests['[node:body]'] = _text_sanitize($instance, $node->langcode, $node->body[$node->langcode][0], 'value');
-    $tests['[node:summary]'] = _text_sanitize($instance, $node->langcode, $node->body[$node->langcode][0], 'summary');
-    $tests['[node:langcode]'] = check_plain($node->langcode);
-    $tests['[node:url]'] = url('node/' . $node->nid, $url_options);
-    $tests['[node:edit-url]'] = url('node/' . $node->nid . '/edit', $url_options);
+    $tests['[node:title]'] = check_plain($node->title->value);
+    $tests['[node:body]'] = _text_sanitize($instance, $node->langcode->value, $node->body[$node->langcode->value][0], 'value');
+    $tests['[node:summary]'] = _text_sanitize($instance, $node->langcode->value, $node->body[$node->langcode->value][0], 'summary');
+    $tests['[node:langcode]'] = check_plain($node->langcode->value);
+    $tests['[node:url]'] = url('node/' . $node->nid->value, $url_options);
+    $tests['[node:edit-url]'] = url('node/' . $node->nid->value . '/edit', $url_options);
     $tests['[node:author]'] = check_plain(user_format_name($account));
-    $tests['[node:author:uid]'] = $node->uid;
+    $tests['[node:author:uid]'] = $node->uid->value;
     $tests['[node:author:name]'] = check_plain(user_format_name($account));
-    $tests['[node:created:since]'] = format_interval(REQUEST_TIME - $node->created, 2, $language_interface->langcode);
-    $tests['[node:changed:since]'] = format_interval(REQUEST_TIME - $node->changed, 2, $language_interface->langcode);
+    $tests['[node:created:since]'] = format_interval(REQUEST_TIME - $node->created->value->getTimestamp(), 2, $language_interface->langcode);
+    $tests['[node:changed:since]'] = format_interval(REQUEST_TIME - $node->changed->value->getTimestamp(), 2, $language_interface->langcode);
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
@@ -71,10 +71,10 @@ function testNodeTokenReplacement() {
     }
 
     // Generate and test unsanitized tokens.
-    $tests['[node:title]'] = $node->title;
-    $tests['[node:body]'] = $node->body[$node->langcode][0]['value'];
-    $tests['[node:summary]'] = $node->body[$node->langcode][0]['summary'];
-    $tests['[node:langcode]'] = $node->langcode;
+    $tests['[node:title]'] = $node->title->value;
+    $tests['[node:body]'] = $node->body[$node->langcode->value][0]['value'];
+    $tests['[node:summary]'] = $node->body[$node->langcode->value][0]['summary'];
+    $tests['[node:langcode]'] = $node->langcode->value;
     $tests['[node:author:name]'] = user_format_name($account);
 
     foreach ($tests as $input => $expected) {
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php
index e191eca..0a4a7c1 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php
@@ -110,7 +110,7 @@ function testLanguageFieldVisibility() {
     $this->assertTrue($node, 'Node found in database.');
 
     // Loads node page and check if Language field is hidden by default.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $language_field = $this->xpath('//div[@id=:id]/div', array(
       ':id' => 'field-language-display',
     ));
@@ -125,7 +125,7 @@ function testLanguageFieldVisibility() {
     $this->assertOptionSelected('edit-fields-language-type', 'visible', 'Language field has been set to visible.');
 
     // Loads node page and check if Language field is shown.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $language_field = $this->xpath('//div[@id=:id]/div', array(
       ':id' => 'field-language-display',
     ));
diff --git a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php
index 8d4e0fe..ddf08d7 100644
--- a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php
@@ -47,7 +47,7 @@ function testPageEdit() {
 
     // Check that "edit" link points to correct page.
     $this->clickLink(t('Edit'));
-    $edit_url = url("node/$node->nid/edit", array('absolute' => TRUE));
+    $edit_url = url('node/' . $node->nid->value . '/edit', array('absolute' => TRUE));
     $actual_url = $this->getURL();
     $this->assertEqual($edit_url, $actual_url, 'On edit page.');
 
@@ -73,7 +73,7 @@ function testPageEdit() {
     $second_web_user = $this->drupalCreateUser(array('administer nodes', 'edit any page content'));
     $this->drupalLogin($second_web_user);
     // Edit the same node, creating a new revision.
-    $this->drupalGet("node/$node->nid/edit");
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $edit = array();
     $edit['title'] = $this->randomName(8);
     $edit[$body_key] = $this->randomName(16);
@@ -82,15 +82,15 @@ function testPageEdit() {
 
     // Ensure that the node revision has been created.
     $revised_node = $this->drupalGetNodeByTitle($edit['title'], TRUE);
-    $this->assertNotIdentical($node->vid, $revised_node->vid, 'A new revision has been created.');
+    $this->assertNotIdentical($node->vid->value, $revised_node->vid->value, 'A new revision has been created.');
     // Ensure that the node author is preserved when it was not changed in the
     // edit form.
-    $this->assertIdentical($node->uid, $revised_node->uid, 'The node author has been preserved.');
+    $this->assertIdentical($node->uid->value, $revised_node->uid->value, 'The node author has been preserved.');
     // Ensure that the revision authors are different since the revisions were
     // made by different users.
-    $first_node_version = node_revision_load($node->vid);
-    $second_node_version = node_revision_load($revised_node->vid);
-    $this->assertNotIdentical($first_node_version->revision_uid, $second_node_version->revision_uid, 'Each revision has a distinct user.');
+    $first_node_version = node_revision_load($node->vid->value);
+    $second_node_version = node_revision_load($revised_node->vid->value);
+    $this->assertNotIdentical($first_node_version->revision_uid->value, $second_node_version->revision_uid->value, 'Each revision has a distinct user.');
   }
 
   /**
@@ -109,32 +109,32 @@ function testPageAuthoredBy() {
 
     // Check that the node was authored by the currently logged in user.
     $node = $this->drupalGetNodeByTitle($edit['title']);
-    $this->assertIdentical($node->uid, $this->admin_user->uid, 'Node authored by admin user.');
+    $this->assertIdentical($node->uid->value, $this->admin_user->uid, 'Node authored by admin user.');
 
     // Try to change the 'authored by' field to an invalid user name.
     $edit = array(
       'name' => 'invalid-name',
     );
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     $this->assertText('The username invalid-name does not exist.');
 
     // Change the authored by field to an empty string, which should assign
     // authorship to the anonymous user (uid 0).
     $edit['name'] = '';
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
-    $node = node_load($node->nid, TRUE);
-    $this->assertIdentical($node->uid, '0', 'Node authored by anonymous user.');
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
+    $node = node_load($node->nid->value, TRUE);
+    $this->assertIdentical($node->uid->value, '0', 'Node authored by anonymous user.');
 
     // Change the authored by field to another user's name (that is not
     // logged in).
     $edit['name'] = $this->web_user->name;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
-    $node = node_load($node->nid, TRUE);
-    $this->assertIdentical($node->uid, $this->web_user->uid, 'Node authored by normal user.');
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
+    $node = node_load($node->nid->value, TRUE);
+    $this->assertIdentical($node->uid->value, $this->web_user->uid, 'Node authored by normal user.');
 
     // Check that normal users cannot change the authored by information.
     $this->drupalLogin($this->web_user);
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertNoFieldByName('name');
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php b/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php
index 460eb25..e38dd39 100644
--- a/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php
@@ -22,10 +22,10 @@ public static function getInfo() {
   function testPageView() {
     // Create a node to view.
     $node = $this->drupalCreateNode();
-    $this->assertTrue(node_load($node->nid), 'Node created.');
+    $this->assertTrue(node_load($node->nid->value), 'Node created.');
 
     // Try to edit with anonymous user.
-    $html = $this->drupalGet("node/$node->nid/edit");
+    $html = $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertResponse(403);
 
     // Create a user without permission to edit node.
@@ -33,7 +33,7 @@ function testPageView() {
     $this->drupalLogin($web_user);
 
     // Attempt to access edit page.
-    $this->drupalGet("node/$node->nid/edit");
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertResponse(403);
 
     // Create user with permission to edit node.
@@ -41,7 +41,7 @@ function testPageView() {
     $this->drupalLogin($web_user);
 
     // Attempt to access edit page.
-    $this->drupalGet("node/$node->nid/edit");
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertResponse(200);
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php
index ffdca5b..719802e 100644
--- a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php
@@ -26,7 +26,7 @@ function testSummaryLength() {
       'promote' => 1,
     );
     $node = $this->drupalCreateNode($settings);
-    $this->assertTrue(node_load($node->nid), 'Node created.');
+    $this->assertTrue(node_load($node->nid->value), 'Node created.');
 
     // Create user with permission to view the node.
     $web_user = $this->drupalCreateUser(array('access content', 'administer content types'));
@@ -39,7 +39,7 @@ function testSummaryLength() {
     $this->assertRaw($expected, t('Check that the summary is 600 characters in length'), 'Node');
 
     // Change the teaser length for "Basic page" content type.
-    $instance = field_info_instance('node', 'body', $node->type);
+    $instance = field_info_instance('node', 'body', $node->type->value);
     $instance['display']['teaser']['settings']['trim_length'] = 200;
     field_update_instance($instance);
 
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index 2ca2d3e..25e22a4 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -355,7 +355,7 @@ function _node_mass_update_batch_process($nodes, $updates, &$context) {
     $node = _node_mass_update_helper($nid, $updates);
 
     // Store result for post-processing in the finished callback.
-    $context['results'][] = l($node->label(), 'node/' . $node->nid);
+    $context['results'][] = l($node->label(), 'node/' . $node->nid->value);
 
     // Update our progress information.
     $context['sandbox']['progress']++;
@@ -491,7 +491,7 @@ function node_admin_nodes() {
   }
   $header['operations'] = array('data' => t('Operations'));
 
-  $query = db_select('node', 'n')
+  $query = db_select('node_property_data', 'n')
     ->extend('Drupal\Core\Database\Query\PagerSelectExtender')
     ->extend('Drupal\Core\Database\Query\TableSortExtender');
   node_build_filter_query($query);
@@ -525,45 +525,45 @@ function node_admin_nodes() {
   $destination = drupal_get_destination();
   $options = array();
   foreach ($nodes as $node) {
-    $l_options = $node->langcode != LANGUAGE_NOT_SPECIFIED && isset($languages[$node->langcode]) ? array('language' => $languages[$node->langcode]) : array();
-    $options[$node->nid] = array(
+    $l_options = $node->langcode->value != LANGUAGE_NOT_SPECIFIED && isset($languages[$node->langcode->value]) ? array('language' => $languages[$node->langcode->value]) : array();
+    $options[$node->nid->value] = array(
       'title' => array(
         'data' => array(
           '#type' => 'link',
           '#title' => $node->label(),
-          '#href' => 'node/' . $node->nid,
+          '#href' => 'node/' . $node->nid->value,
           '#options' => $l_options,
-          '#suffix' => ' ' . theme('mark', array('type' => node_mark($node->nid, $node->changed))),
+          '#suffix' => ' ' . theme('mark', array('type' => node_mark($node->nid->value, $node->changed->value->getTimestamp()))),
         ),
       ),
       'type' => check_plain(node_get_type_label($node)),
-      'author' => theme('username', array('account' => $node)),
-      'status' => $node->status ? t('published') : t('not published'),
-      'changed' => format_date($node->changed, 'short'),
+      'author' => theme('username', array('account' => $node->uid->entity)),
+      'status' => $node->status->value ? t('published') : t('not published'),
+      'changed' => format_date($node->changed->value->getTimestamp(), 'short'),
     );
     if ($multilingual) {
-      $options[$node->nid]['language_name'] = language_name($node->langcode);
+      $options[$node->nid->value]['language_name'] = language_name($node->langcode->value);
     }
     // Build a list of all the accessible operations for the current node.
     $operations = array();
     if (node_access('update', $node)) {
       $operations['edit'] = array(
         'title' => t('edit'),
-        'href' => 'node/' . $node->nid . '/edit',
+        'href' => 'node/' . $node->nid->value . '/edit',
         'query' => $destination,
       );
     }
     if (node_access('delete', $node)) {
       $operations['delete'] = array(
         'title' => t('delete'),
-        'href' => 'node/' . $node->nid . '/delete',
+        'href' => 'node/' . $node->nid->value . '/delete',
         'query' => $destination,
       );
     }
-    $options[$node->nid]['operations'] = array();
+    $options[$node->nid->value]['operations'] = array();
     if (count($operations) > 1) {
       // Render an unordered list of operations links.
-      $options[$node->nid]['operations'] = array(
+      $options[$node->nid->value]['operations'] = array(
         'data' => array(
           '#type' => 'operations',
           '#subtype' => 'node',
@@ -574,7 +574,7 @@ function node_admin_nodes() {
     elseif (!empty($operations)) {
       // Render the first and only operation as a link.
       $link = reset($operations);
-      $options[$node->nid]['operations'] = array(
+      $options[$node->nid->value]['operations'] = array(
         'data' => array(
           '#type' => 'link',
           '#title' => $link['title'],
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index 2daa954..8ae2071 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -271,7 +271,7 @@ function hook_node_access_records(Drupal\node\Node $node) {
     $grants = array();
     // Only published nodes should be viewable to all users. If we allow access
     // blindly here, then all users could view an unpublished node.
-    if ($node->status) {
+    if ($node->status->value) {
       $grants[] = array(
         'realm' => 'example',
         'gid' => 1,
@@ -286,7 +286,7 @@ function hook_node_access_records(Drupal\node\Node $node) {
     // have status unpublished.
     $grants[] = array(
       'realm' => 'example_author',
-      'gid' => $node->uid,
+      'gid' => $node->uid->value,
       'grant_view' => 1,
       'grant_update' => 1,
       'grant_delete' => 1,
@@ -467,7 +467,7 @@ function hook_node_operations() {
  */
 function hook_node_predelete(Drupal\node\Node $node) {
   db_delete('mytable')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
@@ -502,7 +502,7 @@ function hook_node_delete(Drupal\node\Node $node) {
  */
 function hook_node_revision_delete(Drupal\node\Node $node) {
   db_delete('mytable')
-    ->condition('vid', $node->vid)
+    ->condition('vid', $node->vid->value)
     ->execute();
 }
 
@@ -521,7 +521,7 @@ function hook_node_revision_delete(Drupal\node\Node $node) {
 function hook_node_insert(Drupal\node\Node $node) {
   db_insert('mytable')
     ->fields(array(
-      'nid' => $node->nid,
+      'nid' => $node->nid->value,
       'extra' => $node->extra,
     ))
     ->execute();
@@ -610,7 +610,7 @@ function hook_node_load($nodes, $types) {
  * @ingroup node_access
  */
 function hook_node_access($node, $op, $account, $langcode) {
-  $type = is_string($node) ? $node : $node->type;
+  $type = is_string($node) ? $node : $node->type->value;
 
   $configured_types = node_permissions_get_configured_types();
   if (isset($configured_types[$type])) {
@@ -619,13 +619,13 @@ function hook_node_access($node, $op, $account, $langcode) {
     }
 
     if ($op == 'update') {
-      if (user_access('edit any ' . $type . ' content', $account) || (user_access('edit own ' . $type . ' content', $account) && ($account->uid == $node->uid))) {
+      if (user_access('edit any ' . $type . ' content', $account) || (user_access('edit own ' . $type . ' content', $account) && ($account->uid == $node->uid->value))) {
         return NODE_ACCESS_ALLOW;
       }
     }
 
     if ($op == 'delete') {
-      if (user_access('delete any ' . $type . ' content', $account) || (user_access('delete own ' . $type . ' content', $account) && ($account->uid == $node->uid))) {
+      if (user_access('delete any ' . $type . ' content', $account) || (user_access('delete own ' . $type . ' content', $account) && ($account->uid == $node->uid->value))) {
         return NODE_ACCESS_ALLOW;
       }
     }
@@ -648,8 +648,8 @@ function hook_node_access($node, $op, $account, $langcode) {
  * @ingroup node_api_hooks
  */
 function hook_node_prepare(Drupal\node\Node $node) {
-  if (!isset($node->comment)) {
-    $node->comment = variable_get("comment_$node->type", COMMENT_NODE_OPEN);
+  if (!isset($node->comment->value)) {
+    $node->comment = variable_get("comment_{$node->type->value}", COMMENT_NODE_OPEN);
   }
 }
 
@@ -676,7 +676,7 @@ function hook_node_prepare(Drupal\node\Node $node) {
  * @ingroup node_api_hooks
  */
 function hook_node_search_result(Drupal\node\Node $node, $langcode) {
-  $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid))->fetchField();
+  $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid->value))->fetchField();
   return array('comment' => format_plural($comments, '1 comment', '@count comments'));
 }
 
@@ -692,7 +692,7 @@ function hook_node_search_result(Drupal\node\Node $node, $langcode) {
  * @ingroup node_api_hooks
  */
 function hook_node_presave(Drupal\node\Node $node) {
-  if ($node->nid && $node->moderate) {
+  if ($node->nid->value && $node->moderate) {
     // Reset votes when node is updated:
     $node->score = 0;
     $node->users = '';
@@ -715,7 +715,7 @@ function hook_node_presave(Drupal\node\Node $node) {
 function hook_node_update(Drupal\node\Node $node) {
   db_update('mytable')
     ->fields(array('extra' => $node->extra))
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
@@ -737,7 +737,7 @@ function hook_node_update(Drupal\node\Node $node) {
  */
 function hook_node_update_index(Drupal\node\Node $node, $langcode) {
   $text = '';
-  $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED));
+  $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid->value, ':status' => COMMENT_PUBLISHED));
   foreach ($comments as $comment) {
     $text .= '<h2>' . check_plain($comment->subject) . '</h2>' . check_markup($comment->comment, $comment->format, '', TRUE);
   }
@@ -1049,7 +1049,7 @@ function hook_node_type_delete($info) {
  */
 function hook_delete(Drupal\node\Node $node) {
   db_delete('mytable')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
@@ -1110,12 +1110,12 @@ function hook_prepare(Drupal\node\Node $node) {
  * @ingroup node_api_hooks
  */
 function hook_form(Drupal\node\Node $node, &$form_state) {
-  $type = node_type_load($node->type);
+  $type = node_type_load($node->type->value);
 
   $form['title'] = array(
     '#type' => 'textfield',
     '#title' => check_plain($type->title_label),
-    '#default_value' => !empty($node->title) ? $node->title : '',
+    '#default_value' => !empty($node->title->value) ? $node->title->value : '',
     '#required' => TRUE, '#weight' => -5
   );
 
@@ -1158,7 +1158,7 @@ function hook_form(Drupal\node\Node $node, &$form_state) {
 function hook_insert(Drupal\node\Node $node) {
   db_insert('mytable')
     ->fields(array(
-      'nid' => $node->nid,
+      'nid' => $node->nid->value,
       'extra' => $node->extra,
     ))
     ->execute();
@@ -1216,7 +1216,7 @@ function hook_load($nodes) {
 function hook_update(Drupal\node\Node $node) {
   db_update('mytable')
     ->fields(array('extra' => $node->extra))
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index ac777f3..ada7702 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -47,25 +47,18 @@ function node_schema() {
         'not null' => TRUE,
         'default' => '',
       ),
-      'title' => array(
-        'description' => 'The title of this node, always treated as non-markup plain text.',
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-      ),
-      'uid' => array(
-        'description' => 'The {users}.uid that owns this node; initially, this is the user that created it.',
+      'tnid' => array(
+        'description' => 'The translation set id for this node, which equals the node id of the source post in each set.',
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
       ),
-      'status' => array(
-        'description' => 'Boolean indicating whether the node is published (visible to non-administrators).',
+      'translate' => array(
+        'description' => 'A boolean indicating whether this translation page needs to be updated.',
         'type' => 'int',
         'not null' => TRUE,
-        'default' => 1,
+        'default' => 0,
       ),
       'created' => array(
         'description' => 'The Unix timestamp when the node was created.',
@@ -73,54 +66,12 @@ function node_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
-      'changed' => array(
-        'description' => 'The Unix timestamp when the node was most recently saved.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'comment' => array(
-        'description' => 'Whether comments are allowed on this node: 0 = no, 1 = closed (read only), 2 = open (read/write).',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'promote' => array(
-        'description' => 'Boolean indicating whether the node should be displayed on the front page.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'sticky' => array(
-        'description' => 'Boolean indicating whether the node should be displayed at the top of lists in which it appears.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'tnid' => array(
-        'description' => 'The translation set id for this node, which equals the node id of the source post in each set.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'translate' => array(
-        'description' => 'A boolean indicating whether this translation page needs to be updated.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
     ),
     'indexes' => array(
-      'node_changed'        => array('changed'),
-      'node_created'        => array('created'),
-      'node_frontpage'      => array('promote', 'status', 'sticky', 'created'),
-      'node_status_type'    => array('status', 'type', 'nid'),
-      'node_title_type'     => array('title', array('type', 4)),
-      'node_type'           => array(array('type', 4)),
-      'uid'                 => array('uid'),
-      'tnid'                => array('tnid'),
-      'translate'           => array('translate'),
+      'node_type'     => array(array('type', 4)),
+      'node_created'  => array('created'),
+      'tnid'          => array('tnid'),
+      'translate'     => array('translate'),
     ),
     'unique keys' => array(
       'vid' => array('vid'),
@@ -131,14 +82,141 @@ function node_schema() {
         'table' => 'node_revision',
         'columns' => array('vid' => 'vid'),
       ),
-      'node_author' => array(
-        'table' => 'users',
-        'columns' => array('uid' => 'uid'),
-      ),
     ),
     'primary key' => array('nid'),
   );
 
+  // Node property storage.
+  $schema['node_property_data'] = $schema['node'];
+  $schema['node_property_data']['description'] = 'Base table for node properties.';
+  $schema['node_property_data']['fields'] = array(
+    'nid' => array(
+      'description' => 'The primary identifier for a node.',
+      'type' => 'serial',
+      'unsigned' => TRUE,
+      'not null' => TRUE,
+    ),
+    // Defaults to NULL in order to avoid a brief period of potential
+    // deadlocks on the index.
+    'vid' => array(
+      'description' => 'The current {node_property_data_revision}.vid version identifier.',
+      'type' => 'int',
+      'unsigned' => TRUE,
+      'not null' => FALSE,
+      'default' => NULL,
+    ),
+    'langcode' => array(
+      'description' => 'The {language}.langcode of this node.',
+      'type' => 'varchar',
+      'length' => 12,
+      'not null' => TRUE,
+      'default' => '',
+    ),
+    'title' => array(
+      'description' => 'The title of this node, always treated as non-markup plain text.',
+      'type' => 'varchar',
+      'length' => 255,
+      'not null' => TRUE,
+      'default' => '',
+    ),
+    'uid' => array(
+      'description' => 'The {users}.uid that owns this node; initially, this is the user that created it.',
+      'type' => 'int',
+      'unsigned' => TRUE,
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+    'status' => array(
+      'description' => 'Boolean indicating whether the node is published (visible to non-administrators).',
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 1,
+    ),
+    'changed' => array(
+      'description' => 'The Unix timestamp when the node was most recently saved.',
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+    'comment' => array(
+      'description' => 'Whether comments are allowed on this node: 0 = no, 1 = closed (read only), 2 = open (read/write).',
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+    'promote' => array(
+      'description' => 'Boolean indicating whether the node should be displayed on the front page.',
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+    'sticky' => array(
+      'description' => 'Boolean indicating whether the node should be displayed at the top of lists in which it appears.',
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+  );
+  $schema['node_property_data']['indexes'] = array(
+    'node_changed'    => array('changed'),
+    'node_frontpage'  => array('promote', 'status', 'sticky', 'changed'),
+    'node_status'     => array('status', 'nid'),
+    'node_title'      => array('title'),
+    'uid'             => array('uid'),
+  );
+  $schema['node_property_data']['unique keys'] = array(
+    'vid' => array('vid'),
+  );
+  $schema['node_property_data']['foreign keys'] = array(
+    'node_base' => array(
+      'table' => 'node',
+      'columns' => array('nid' => 'nid'),
+    ),
+    'node_author' => array(
+      'table' => 'users',
+      'columns' => array('uid' => 'uid'),
+    ),
+  );
+  $schema['node_property_data']['primary key'] = array('nid', 'vid', 'langcode');
+
+  $schema['node_property_data_revision'] = $schema['node_property_data'];
+  $schema['node_property_data_revision']['description'] = 'Stores information about each saved version of a {node}.';
+  // Adjust the descriptions of the revision fields.
+  $schema['node_property_data_revision']['fields']['nid']['description']     = 'The {node} this version belongs to.';
+  $schema['node_property_data_revision']['fields']['vid']['description']     = 'The primary identifier for this version.';
+  $schema['node_property_data_revision']['fields']['uid']['description']     = 'The {users}.uid that created this version.';
+  $schema['node_property_data_revision']['fields']['title']['description']   = 'The title of this version.';
+  $schema['node_property_data_revision']['fields']['status']['description']  = 'Boolean indicating whether the node (at the time of this revision) is published (visible to non-administrators).';
+  $schema['node_property_data_revision']['fields']['changed']['description'] = 'The Unix timestamp when this revision was saved.';
+  $schema['node_property_data_revision']['fields']['comment']['description'] = 'Whether comments are allowed on this node (at the time of this revision): 0 = no, 1 = closed (read only), 2 = open (read/write).';
+  $schema['node_property_data_revision']['fields']['promote']['description'] = 'Boolean indicating whether the node (at the time of this revision) should be displayed on the front page.';
+  $schema['node_property_data_revision']['fields']['sticky']['description']  = 'Boolean indicating whether the node (at the time of this revision) should be displayed at the top of lists in which it appears.';
+  // Add revision specific fields.
+  $schema['node_property_data_revision']['fields'] += array(
+    'log' => array(
+      'description' => 'The log entry explaining the changes in this version.',
+      'type' => 'text',
+      'not null' => TRUE,
+      'size' => 'big',
+    ),
+  );
+
+  $schema['node_property_data_revision']['indexes'] = array(
+    'nid' => array('nid'),
+    'uid' => array('uid'),
+  );
+  $schema['node_property_data_revision']['foreign keys'] = array(
+    'versioned_node' => array(
+      'table' => 'node',
+      'columns' => array('nid' => 'nid'),
+    ),
+    'version_author' => array(
+      'table' => 'users',
+      'columns' => array('uid' => 'uid'),
+    ),
+  );
+  $schema['node_property_data_revision']['primary key'] = array('vid');
+
   $schema['node_access'] = array(
     'description' => 'Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes.',
     'fields' => array(
@@ -194,90 +272,6 @@ function node_schema() {
         'table' => 'node',
         'columns' => array('nid' => 'nid'),
       ),
-     ),
-  );
-
-  $schema['node_revision'] = array(
-    'description' => 'Stores information about each saved version of a {node}.',
-    'fields' => array(
-      'nid' => array(
-        'description' => 'The {node} this version belongs to.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'vid' => array(
-        'description' => 'The primary identifier for this version.',
-        'type' => 'serial',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-      ),
-      'uid' => array(
-        'description' => 'The {users}.uid that created this version.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'title' => array(
-        'description' => 'The title of this version.',
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-      ),
-      'log' => array(
-        'description' => 'The log entry explaining the changes in this version.',
-        'type' => 'text',
-        'not null' => TRUE,
-        'size' => 'big',
-      ),
-      'timestamp' => array(
-        'description' => 'A Unix timestamp indicating when this version was created.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'status' => array(
-        'description' => 'Boolean indicating whether the node (at the time of this revision) is published (visible to non-administrators).',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 1,
-      ),
-      'comment' => array(
-        'description' => 'Whether comments are allowed on this node (at the time of this revision): 0 = no, 1 = closed (read only), 2 = open (read/write).',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'promote' => array(
-        'description' => 'Boolean indicating whether the node (at the time of this revision) should be displayed on the front page.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'sticky' => array(
-        'description' => 'Boolean indicating whether the node (at the time of this revision) should be displayed at the top of lists in which it appears.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-    ),
-    'indexes' => array(
-      'nid' => array('nid'),
-      'uid' => array('uid'),
-    ),
-    'primary key' => array('vid'),
-    'foreign keys' => array(
-      'versioned_node' => array(
-        'table' => 'node',
-        'columns' => array('nid' => 'nid'),
-      ),
-      'version_author' => array(
-        'table' => 'users',
-        'columns' => array('uid' => 'uid'),
-      ),
     ),
   );
 
@@ -365,7 +359,7 @@ function node_schema() {
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'size' => 'tiny'
+        'size' => 'tiny',
       ),
       'orig_type' => array(
         'description' => 'The original machine-readable name of this node type. This may be different from the current type name if the locked field is 0.',
@@ -663,6 +657,104 @@ function node_update_8005() {
   );
 }
 
+  /**
+   * Add dedicated tables for node properties.
+   */
+function node_update_8009() {
+  $schema = node_schema();
+  $node_count = db_select('node')->countQuery()->execute()->fetchColumn();
+  $node_property_revision_count = 0;
+  $node_property_count = 0;
+  $deprecated_base_table_fields = array(
+    'title',
+    'uid',
+    'status',
+    'changed',
+    'comment',
+    'promote',
+    'sticky',
+  );
+  $deprecated_base_table_indexes = array(
+    'node_changed',
+    'node_frontpage',
+    'node_status_type',
+    'node_title_type',
+    'node_type',
+    'uid',
+  );
+
+  $base_table_migration_fields = array_merge(array('nid', 'vid', 'langcode'), $deprecated_base_table_fields);
+
+  // Create property table if necessary.
+  if (!db_table_exists('node_property_data')) {
+    db_create_table('node_property_data', $schema['node_property_data']);
+  }
+
+  // Create property revision table if necessary.
+  if (!db_table_exists('node_property_data_revision')) {
+    db_create_table('node_property_data_revision', $schema['node_property_data_revision']);
+  }
+
+  // Create initial property data set if necessary.
+  if (db_table_exists('node_property_data')) {
+    $node_property_count = db_select('node_property_data')->countQuery()->execute()->fetchColumn();
+    if ($node_property_count != $node_count) {
+      $source_query = db_select('node')
+        ->fields('node', $base_table_migration_fields);
+      db_insert('node_property_data')->from($source_query)->execute();
+      $node_property_count = db_select('node_property_data')->countQuery()->execute()->fetchColumn();
+    }
+  }
+
+  // Create initial data set if necessary.
+  if (db_table_exists('node_property_data_revision') && db_table_exists('node_revision')) {
+    $node_property_revision_count = db_select('node_property_data_revision')->countQuery()->execute()->fetchColumn();
+    if (db_select('node_revision')->countQuery()->execute()->fetchColumn() != $node_property_revision_count) {
+      $revision_table_migration_fields = $base_table_migration_fields;
+      $revision_table_migration_fields[] = 'log';
+      $source_query = db_select('node_revision', 'nr');
+      $source_query->addJoin('INNER', 'node_property_data', 'n', 'n.nid = nr.nid');
+      $source_query->addField('nr', 'nid');
+      $source_query->addField('nr', 'vid');
+      $source_query->addField('n', 'langcode');
+      $source_query->addField('nr', 'uid');
+      $source_query->addField('nr', 'title');
+      $source_query->addField('nr', 'status');
+      $source_query->addField('nr', 'timestamp', 'changed');
+      $source_query->addField('nr', 'comment');
+      $source_query->addField('nr', 'promote');
+      $source_query->addField('nr', 'sticky');
+      $source_query->addField('nr', 'log');
+
+      db_insert('node_property_data_revision')->from($source_query)->execute();
+      $node_property_revision_count = db_select('node_property_data')->countQuery()->execute()->fetchColumn();
+    }
+  }
+
+  // Modify original tables if possible and necessary.
+  if ($node_property_count == $node_count) {
+    // Drop deprecated indexes.
+    foreach ($deprecated_base_table_indexes as $deprecated_index) {
+      if (db_index_exists('node', $deprecated_index)) {
+        db_drop_index('node', 'node_changed');
+      }
+    }
+    // Recreate index.
+    if (!db_index_exists('node', 'node_type')) {
+      db_add_index('node', 'node_type', array(array('type', 4)));
+    }
+    // Drop deprecated fields.
+    foreach ($deprecated_base_table_fields as $deprecated_base_field) {
+      if (db_field_exists('node', $deprecated_base_field)) {
+        db_drop_field('node', $deprecated_base_field);
+      }
+    }
+  }
+  if (db_table_exists('node_revision') && db_select('node_revision')->countQuery()->execute()->fetchColumn() == $node_property_revision_count) {
+    db_drop_table('node_revision');
+  }
+}
+
 /**
  * @} End of "addtogroup updates-7.x-to-8.x"
  * The next series of updates should start at 9000.
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 2dd1b57..336da38 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -139,7 +139,7 @@ function node_help($path, $arg) {
 
     case 'node/%/edit':
       $node = node_load($arg[1]);
-      $type = node_type_load($node->type);
+      $type = node_type_load($node->type->value);
       return (!empty($type->help) ? '<p>' . filter_xss_admin($type->help) . '</p>' : '');
   }
 
@@ -203,7 +203,8 @@ function node_entity_info() {
         'default' => 'Drupal\node\NodeFormController',
       ),
       'base table' => 'node',
-      'revision table' => 'node_revision',
+      'data table' => 'node_property_data',
+      'revision table' => 'node_property_data_revision',
       'uri callback' => 'node_uri',
       'fieldable' => TRUE,
       'entity keys' => array(
@@ -293,7 +294,7 @@ function node_field_display_node_alter(&$display, $context) {
  */
 function node_uri(Node $node) {
   return array(
-    'path' => 'node/' . $node->nid,
+    'path' => 'node/' . $node->nid->value,
   );
 }
 
@@ -335,7 +336,7 @@ function node_title_list($result, $title = NULL) {
   $num_rows = FALSE;
   foreach ($result as $node) {
     // Do not use $node->label() here, because $node comes from the database.
-    $items[] = l($node->title, 'node/' . $node->nid, !empty($node->comment_count) ? array('attributes' => array('title' => format_plural($node->comment_count, '1 comment', '@count comments'))) : array());
+    $items[] = l($node->title->value, 'node/' . $node->nid->value, !empty($node->comment_count) ? array('attributes' => array('title' => format_plural($node->comment_count, '1 comment', '@count comments'))) : array());
     $num_rows = TRUE;
   }
 
@@ -354,7 +355,7 @@ function node_tag_new(Node $node) {
     db_merge('history')
       ->key(array(
         'uid' => $user->uid,
-        'nid' => $node->nid,
+        'nid' => $node->nid->value,
       ))
       ->fields(array('timestamp' => REQUEST_TIME))
       ->execute();
@@ -488,7 +489,7 @@ function node_type_get_label($name) {
  */
 function node_get_type_label($node) {
   $types = _node_types_build()->names;
-  return isset($types[$node->type]) ? $types[$node->type] : FALSE;
+  return isset($types[$node->type->value]) ? $types[$node->type->value] : FALSE;
 }
 
 /**
@@ -1022,7 +1023,7 @@ function node_hook($type, $hook) {
  *   The returned value of the invoked hook.
  */
 function node_invoke($node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) {
-  if ($function = node_hook($node->type, $hook)) {
+  if ($function = node_hook($node->type->value, $hook)) {
     return $function($node, $a2, $a3, $a4);
   }
 }
@@ -1107,7 +1108,7 @@ function node_submit($node) {
     $node->revision_uid = $user->uid;
   }
 
-  $node->created = !empty($node->date) ? strtotime($node->date) : REQUEST_TIME;
+  $node->created = !empty($node->date->value) ? strtotime($node->date->value->getTimestamp()) : REQUEST_TIME;
   $node->validated = TRUE;
 
   return $node;
@@ -1163,9 +1164,9 @@ function node_revision_delete($revision_id) {
       return FALSE;
     }
 
-    db_delete('node_revision')
-      ->condition('nid', $revision->nid)
-      ->condition('vid', $revision->vid)
+    db_delete('node_property_data_revision')
+      ->condition('nid', $revision->nid->value)
+      ->condition('vid', $revision->vid->value)
       ->execute();
     module_invoke_all('node_revision_delete', $revision);
     field_attach_delete_revision('node', $revision);
@@ -1211,8 +1212,8 @@ function node_view(Node $node, $view_mode = 'full', $langcode = NULL) {
   // displayed on its own page. Modules may alter this behavior (for example,
   // to restrict contextual links to certain view modes) by implementing
   // hook_node_view_alter().
-  if (!empty($node->nid) && !($view_mode == 'full' && node_is_page($node))) {
-    $build['#contextual_links']['node'] = array('node', array($node->nid));
+  if (!empty($node->nid->value) && !($view_mode == 'full' && node_is_page($node))) {
+    $build['#contextual_links']['node'] = array('node', array($node->nid->value));
   }
 
   // Allow modules to modify the structured node.
@@ -1263,7 +1264,7 @@ function node_build_content(Node $node, $view_mode = 'full', $langcode = NULL) {
 
   // The 'view' hook can be implemented to overwrite the default function
   // to display nodes.
-  if (node_hook($node->type, 'view')) {
+  if (node_hook($node->type->value, 'view')) {
     $node = node_invoke($node, 'view', $view_mode, $langcode);
   }
 
@@ -1271,9 +1272,11 @@ function node_build_content(Node $node, $view_mode = 'full', $langcode = NULL) {
   // In case of a multiple view, node_view_multiple() already ran the
   // 'prepare_view' step. An internal flag prevents the operation from running
   // twice.
-  field_attach_prepare_view('node', array($node->nid => $node), $view_mode, $langcode);
-  entity_prepare_view('node', array($node->nid => $node), $langcode);
+  $node->setCompatibilityMode(TRUE);
+  field_attach_prepare_view('node', array($node->id() => $node), $view_mode, $langcode);
+  entity_prepare_view('node', array($node->id() => $node), $langcode);
   $node->content += field_attach_view('node', $node, $view_mode, $langcode);
+  $node->setCompatibilityMode(FALSE);
 
   // Always display a read more link on teasers because we have no way
   // to know when a teaser view is different than a full view.
@@ -1287,7 +1290,7 @@ function node_build_content(Node $node, $view_mode = 'full', $langcode = NULL) {
     $node_title_stripped = strip_tags($node->label());
     $links['node-readmore'] = array(
       'title' => t('Read more<span class="element-invisible"> about @title</span>', array('@title' => $node_title_stripped)),
-      'href' => 'node/' . $node->nid,
+      'href' => 'node/' . $node->nid->value,
       'html' => TRUE,
       'attributes' => array('rel' => 'tag', 'title' => $node_title_stripped),
     );
@@ -1329,11 +1332,11 @@ function node_build_content(Node $node, $view_mode = 'full', $langcode = NULL) {
  */
 function node_show(Node $node, $message = FALSE) {
   if ($message) {
-    drupal_set_title(t('Revision of %title from %date', array('%title' => $node->label(), '%date' => format_date($node->revision_timestamp))), PASS_THROUGH);
+    drupal_set_title(t('Revision of %title from %date', array('%title' => $node->label(), '%date' => format_date($node->revision_timestamp->value->getTimestamp()))), PASS_THROUGH);
   }
 
   // For markup consistency with other pages, use node_view_multiple() rather than node_view().
-  $nodes = node_view_multiple(array($node->nid => $node), 'full');
+  $nodes = node_view_multiple(array($node->nid->value => $node), 'full');
 
   // Update the history table, stating that this user viewed this node.
   node_tag_new($node);
@@ -1352,7 +1355,7 @@ function node_show(Node $node, $message = FALSE) {
  */
 function node_is_page(Node $node) {
   $page_node = menu_get_object();
-  return (!empty($page_node) ? $page_node->nid == $node->nid : FALSE);
+  return (!empty($page_node) ? $page_node->nid->value == $node->nid->value : FALSE);
 }
 
  /**
@@ -1393,9 +1396,9 @@ function template_preprocess_node(&$variables) {
   $variables['node'] = $variables['elements']['#node'];
   $node = $variables['node'];
 
-  $variables['date']      = format_date($node->created);
+  $variables['date']      = format_date($node->created->value->getTimestamp());
   $variables['name']      = theme('username', array(
-    'account' => $node,
+    'account' => $node->uid->entity,
     'link_attributes' => array('rel' => 'author'),
   ));
 
@@ -1414,10 +1417,12 @@ function template_preprocess_node(&$variables) {
   }
 
   // Make the field variables available with the appropriate language.
+  $node->setCompatibilityMode(TRUE);
   field_attach_preprocess('node', $node, $variables['content'], $variables);
+  $node->setCompatibilityMode(FALSE);
 
   // Display post information only on certain node types.
-  if (variable_get('node_submitted_' . $node->type, TRUE)) {
+  if (variable_get('node_submitted_' . $node->type->value, TRUE)) {
     $variables['display_submitted'] = TRUE;
     $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));
     $variables['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' => $node)) : '';
@@ -1428,11 +1433,29 @@ function template_preprocess_node(&$variables) {
     $variables['user_picture'] = '';
   }
 
+  // Add properties to the variable.
+  $properties = array(
+    'nid', 'uuid','langcode', 'vid', 'title', 'uid', 'created', 'changed',
+    'status', 'sticky', 'promote', 'comment', 'type', 'tnid', 'translate',
+    'revision_timestamp', 'revision_uid',
+  );
+  foreach ($properties as $property) {
+    switch ($node->$property->get('value')->getType()) {
+      // Store dates using timestamps.
+      case 'date':
+        $variables[$property] = $node->$property->value->getTimestamp();
+        break;
+      default:
+        $variables[$property] = $node->$property->value;
+        break;
+    }
+  }
+
   // Add article ARIA role.
   $variables['attributes']['role'] = 'article';
 
   // Gather node classes.
-  $variables['attributes']['class'][] = drupal_html_class('node-' . $node->type);
+  $variables['attributes']['class'][] = drupal_html_class('node-' . $node->type->value);
   if ($variables['promote']) {
     $variables['attributes']['class'][] = 'promoted';
   }
@@ -1450,8 +1473,8 @@ function template_preprocess_node(&$variables) {
   }
 
   // Clean up name so there are no underscores.
-  $variables['theme_hook_suggestions'][] = 'node__' . $node->type;
-  $variables['theme_hook_suggestions'][] = 'node__' . $node->nid;
+  $variables['theme_hook_suggestions'][] = 'node__' . $node->type->value;
+  $variables['theme_hook_suggestions'][] = 'node__' . $node->nid->value;
 }
 
 /**
@@ -1642,13 +1665,13 @@ function node_search_execute($keys = NULL, $conditions = NULL) {
       'link' => url($uri['path'], array_merge($uri['options'], array('absolute' => TRUE, 'language' => $language))),
       'type' => check_plain(node_get_type_label($node)),
       'title' => $node->label($item->langcode),
-      'user' => theme('username', array('account' => $node)),
+      'user' => theme('username', array('account' => $node->uid->entity)),
       'date' => $node->get('changed', $item->langcode),
       'node' => $node,
       'extra' => $extra,
       'score' => $item->calculated_score,
       'snippet' => search_excerpt($keys, $node->rendered, $item->langcode),
-      'langcode' => $node->langcode,
+      'langcode' => $node->langcode->value,
     );
   }
   return $results;
@@ -1715,7 +1738,7 @@ function node_user_cancel($edit, $account, $method) {
         ->fetchCol();
       node_mass_update($nodes, array('uid' => 0));
       // Anonymize old revisions.
-      db_update('node_revision')
+      db_update('node_property_data_revision')
         ->fields(array('uid' => 0))
         ->condition('uid', $account->uid)
         ->execute();
@@ -1740,7 +1763,7 @@ function node_user_predelete($account) {
     ->fetchCol();
   node_delete_multiple($nodes);
   // Delete old revisions.
-  $revisions = db_query('SELECT vid FROM {node_revision} WHERE uid = :uid', array(':uid' => $account->uid))->fetchCol();
+  $revisions = db_query('SELECT vid FROM {node_property_data_revision} WHERE uid = :uid', array(':uid' => $account->uid))->fetchCol();
   foreach ($revisions as $revision) {
     node_revision_delete($revision);
   }
@@ -1821,12 +1844,12 @@ function _node_revision_access(Node $node, $op = 'view', $account = NULL, $langc
 
   // If no language code was provided, default to the node revision's langcode.
   if (empty($langcode)) {
-    $langcode = $node->langcode;
+    $langcode = $node->langcode->value;
   }
 
   // Statically cache access by revision ID, language code, user account ID,
   // and operation.
-  $cid = $node->vid . ':' . $langcode . ':' . $account->uid . ':' . $op;
+  $cid = $node->vid->value . ':' . $langcode . ':' . $account->uid . ':' . $op;
 
   if (!isset($access[$cid])) {
     // Perform basic permission checks first.
@@ -1839,7 +1862,7 @@ function _node_revision_access(Node $node, $op = 'view', $account = NULL, $langc
     // different revisions so there is no need for a separate database check.
     // Also, if you try to revert to or delete the default revision, that's
     // not good.
-    if ($node->isDefaultRevision() && (db_query('SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() == 1 || $op == 'update' || $op == 'delete')) {
+    if ($node->isDefaultRevision() && (db_query('SELECT COUNT(vid) FROM {node_property_data_revision} WHERE nid = :nid', array(':nid' => $node->nid->value))->fetchField() == 1 || $op == 'update' || $op == 'delete')) {
       $access[$cid] = FALSE;
     }
     elseif (user_access('administer nodes', $account)) {
@@ -1848,7 +1871,7 @@ function _node_revision_access(Node $node, $op = 'view', $account = NULL, $langc
     else {
       // First check the access to the default revision and finally, if the
       // node passed in is not the default revision then access to that, too.
-      $access[$cid] = node_access($op, node_load($node->nid), $account, $langcode) && ($node->isDefaultRevision() || node_access($op, $node, $account, $langcode));
+      $access[$cid] = node_access($op, node_load($node->nid->value), $account, $langcode) && ($node->isDefaultRevision() || node_access($op, $node, $account, $langcode));
     }
   }
 
@@ -2110,7 +2133,7 @@ function node_page_title(Node $node) {
  *   A unix timestamp indicating the last time the node was changed.
  */
 function node_last_changed($nid) {
-  return db_query('SELECT changed FROM {node} WHERE nid = :nid', array(':nid' => $nid))->fetch()->changed;
+  return db_query('SELECT changed FROM {node_property_data} WHERE nid = :nid', array(':nid' => $nid))->fetch()->changed;
 }
 
 /**
@@ -2124,7 +2147,7 @@ function node_last_changed($nid) {
  */
 function node_revision_list(Node $node) {
   $revisions = array();
-  $result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, r.timestamp, u.name FROM {node_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = :nid ORDER BY r.vid DESC', array(':nid' => $node->nid));
+  $result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, r.changed, u.name FROM {node_property_data_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = :nid ORDER BY r.vid DESC', array(':nid' => $node->nid->value));
   foreach ($result as $revision) {
     $revisions[$revision->vid] = $revision;
   }
@@ -2267,13 +2290,13 @@ function theme_node_recent_block($variables) {
     );
     if (node_access('update', $node)) {
       $row[] = array(
-        'data' => l(t('edit'), 'node/' . $node->nid . '/edit', $l_options),
+        'data' => l(t('edit'), 'node/' . $node->nid->value . '/edit', $l_options),
         'class' => 'edit',
       );
     }
     if (node_access('delete', $node)) {
       $row[] = array(
-        'data' => l(t('delete'), 'node/' . $node->nid . '/delete', $l_options),
+        'data' => l(t('delete'), 'node/' . $node->nid->value . '/delete', $l_options),
         'class' => 'delete',
       );
     }
@@ -2303,10 +2326,10 @@ function theme_node_recent_content($variables) {
   $node = $variables['node'];
 
   $output = '<div class="node-title">';
-  $output .= l($node->label(), 'node/' . $node->nid);
-  $output .= theme('mark', array('type' => node_mark($node->nid, $node->changed)));
+  $output .= l($node->label(), 'node/' . $node->nid->value);
+  $output .= theme('mark', array('type' => node_mark($node->nid->value, $node->changed->value->getTimestamp())));
   $output .= '</div><div class="node-author">';
-  $output .= theme('username', array('account' => user_load($node->uid)));
+  $output .= theme('username', array('account' => $node->uid->entity));
   $output .= '</div>';
 
   return $output;
@@ -2435,7 +2458,7 @@ function node_block_list_alter(&$blocks) {
     if (isset($block_node_types[$block->module][$block->delta])) {
       if (!empty($node)) {
         // This is a node or node edit page.
-        if (!isset($block_node_types[$block->module][$block->delta][$node->type])) {
+        if (!isset($block_node_types[$block->module][$block->delta][$node->type->value])) {
           // This block should not be displayed for this node type.
           unset($blocks[$key]);
           continue;
@@ -2507,12 +2530,12 @@ function node_feed($nids = FALSE, $channel = array()) {
   foreach ($nodes as $node) {
     $item_text = '';
 
-    $node->link = url("node/$node->nid", array('absolute' => TRUE));
+    $node->link = url("node/$node->nid->value", array('absolute' => TRUE));
     $node->rss_namespaces = array();
     $node->rss_elements = array(
-      array('key' => 'pubDate', 'value' => gmdate('r', $node->created)),
-      array('key' => 'dc:creator', 'value' => $node->name),
-      array('key' => 'guid', 'value' => $node->nid . ' at ' . $base_url, 'attributes' => array('isPermaLink' => 'false'))
+      array('key' => 'pubDate', 'value' => gmdate('r', $node->created->value->getTimestamp())),
+      array('key' => 'dc:creator', 'value' => $node->name->value),
+      array('key' => 'guid', 'value' => $node->nid->value . ' at ' . $base_url, 'attributes' => array('isPermaLink' => 'false'))
     );
 
     // The node gets built and modules add to or modify $node->rss_elements
@@ -2572,8 +2595,8 @@ function node_view_multiple($nodes, $view_mode = 'teaser', $weight = 0, $langcod
   entity_prepare_view('node', $nodes, $langcode);
   $build = array();
   foreach ($nodes as $node) {
-    $build['nodes'][$node->nid] = node_view($node, $view_mode, $langcode);
-    $build['nodes'][$node->nid]['#weight'] = $weight;
+    $build['nodes'][$node->nid->value] = node_view($node, $view_mode, $langcode);
+    $build['nodes'][$node->nid->value]['#weight'] = $weight;
     $weight++;
   }
   $build['nodes']['#sorted'] = TRUE;
@@ -2695,9 +2718,9 @@ function _node_index_node(Node $node) {
 
   // Save the changed time of the most recent indexed node, for the search
   // results half-life calculation.
-  variable_set('node_cron_last', $node->changed);
+  variable_set('node_cron_last', $node->changed->value->getTimestamp());
 
-  $languages = array_merge(array(language_load($node->langcode)), $node->translations());
+  $languages = array_merge(array(language_load($node->langcode->value)), $node->translations());
 
   foreach ($languages as $language) {
     // Render the node.
@@ -2715,7 +2738,7 @@ function _node_index_node(Node $node) {
     }
 
     // Update index.
-    search_index($node->nid, 'node', $text, $language->langcode);
+    search_index($node->nid->value, 'node', $text, $language->langcode);
   }
 }
 
@@ -2982,13 +3005,13 @@ function node_access($op, $node, $account = NULL, $langcode = NULL) {
 
   // $node may be a node object, a node type object, or a node type string.
   // Use the node ID as the primary cache ID, or the node type name otherwise.
-  $cid = is_object($node) ? (isset($node->nid) ? $node->nid : $node->type) : $node;
+  $cid = is_object($node) ? (isset($node->nid->value) ? $node->nid->value : $node->type->value) : $node;
 
   // If no language code was provided, default to the node's langcode or
   // to an empty langcode if a node type was requested. The latter is purely
   // for caching purposes.
   if (empty($langcode)) {
-    $langcode = (is_object($node) && isset($node->nid)) ? $node->langcode : '';
+    $langcode = (is_object($node) && isset($node->nid->value)) ? $node->langcode->value : '';
   }
 
   // If we've already checked access for this node, user and op, return from
@@ -3029,13 +3052,13 @@ function node_access($op, $node, $account = NULL, $langcode = NULL) {
 
   // If the module did not override the access rights, use those set in the
   // node_access table.
-  if ($op != 'create' && $node->nid) {
+  if ($op != 'create' && $node->nid->value) {
     if (module_implements('node_grants')) {
       $query = db_select('node_access');
       $query->addExpression('1');
       $query->condition('grant_' . $op, 1, '>=');
-      $nids = db_or()->condition('nid', $node->nid);
-      if ($node->status) {
+      $nids = db_or()->condition('nid', $node->nid->value);
+      if ($node->status->value) {
         $nids->condition('nid', 0);
       }
       $query->condition($nids);
@@ -3074,7 +3097,7 @@ function node_access($op, $node, $account = NULL, $langcode = NULL) {
  * Implements hook_node_access().
  */
 function node_node_access($node, $op, $account) {
-  $type = is_string($node) ? $node : $node->type;
+  $type = is_string($node) ? $node : $node->type->value;
 
   $configured_types = node_permissions_get_configured_types();
   if (isset($configured_types[$type])) {
@@ -3083,13 +3106,13 @@ function node_node_access($node, $op, $account) {
     }
 
     if ($op == 'update') {
-      if (user_access('edit any ' . $type . ' content', $account) || (user_access('edit own ' . $type . ' content', $account) && ($account->uid == $node->uid))) {
+      if (user_access('edit any ' . $type . ' content', $account) || (user_access('edit own ' . $type . ' content', $account) && ($account->uid == $node->uid->value))) {
         return NODE_ACCESS_ALLOW;
       }
     }
 
     if ($op == 'delete') {
-      if (user_access('delete any ' . $type . ' content', $account) || (user_access('delete own ' . $type . ' content', $account) && ($account->uid == $node->uid))) {
+      if (user_access('delete any ' . $type . ' content', $account) || (user_access('delete own ' . $type . ' content', $account) && ($account->uid == $node->uid->value))) {
         return NODE_ACCESS_ALLOW;
       }
     }
@@ -3441,7 +3464,7 @@ function node_access_acquire_grants(Node $node, $delete = TRUE) {
   // Let modules alter the grants.
   drupal_alter('node_access_records', $grants, $node);
   // If no grants are set and the node is published, then use the default grant.
-  if (empty($grants) && !empty($node->status)) {
+  if (empty($grants) && !empty($node->status->value)) {
     $grants[] = array('realm' => 'all', 'gid' => 0, 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0);
   }
   _node_access_write_grants($node, $grants, NULL, $delete);
@@ -3477,7 +3500,7 @@ function node_access_acquire_grants(Node $node, $delete = TRUE) {
  */
 function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete = TRUE) {
   if ($delete) {
-    $query = db_delete('node_access')->condition('nid', $node->nid);
+    $query = db_delete('node_access')->condition('nid', $node->nid->value);
     if ($realm) {
       $query->condition('realm', array($realm, 'all'), 'IN');
     }
@@ -3493,7 +3516,7 @@ function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete =
       }
       // Only write grants; denies are implicit.
       if ($grant['grant_view'] || $grant['grant_update'] || $grant['grant_delete']) {
-        $grant['nid'] = $node->nid;
+        $grant['nid'] = $node->nid->value;
         $query->values($grant);
       }
     }
@@ -3680,14 +3703,14 @@ function node_content_form(Node $node, $form_state) {
   // @todo It is impossible to define a content type without implementing
   //   hook_form(). Remove this requirement.
   $form = array();
-  $type = node_type_load($node->type);
+  $type = node_type_load($node->type->value);
 
   if ($type->has_title) {
     $form['title'] = array(
       '#type' => 'textfield',
       '#title' => check_plain($type->title_label),
       '#required' => TRUE,
-      '#default_value' => $node->title,
+      '#default_value' => $node->title->value,
       '#maxlength' => 255,
       '#weight' => -5,
     );
diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc
index 1780fb9..48cfa5c 100644
--- a/core/modules/node/node.pages.inc
+++ b/core/modules/node/node.pages.inc
@@ -128,7 +128,7 @@ function node_add($node_type) {
  */
 function node_preview(Node $node) {
   if (node_access('create', $node) || node_access('update', $node)) {
-    _field_invoke_multiple('load', 'node', array($node->nid => $node));
+    _field_invoke_multiple('load', 'node', array($node->nid->value => $node));
     // Load the user's name when needed.
     if (isset($node->name)) {
       // The use of isset() is mandatory in the context of user IDs, because
@@ -141,14 +141,14 @@ function node_preview(Node $node) {
         $node->uid = 0; // anonymous user
       }
     }
-    elseif ($node->uid) {
-      $user = user_load($node->uid);
+    elseif ($node->uid->value) {
+      $user = $node->uid->entity;
       $node->name = $user->name;
       $node->picture = $user->picture;
     }
 
     $node->changed = REQUEST_TIME;
-    $nodes = array($node->nid => $node);
+    $nodes = array($node->nid->value => $node);
     field_attach_prepare_view('node', $nodes, 'full');
 
     // Display a preview of the node.
@@ -213,10 +213,10 @@ function theme_node_preview($variables) {
  */
 function node_delete_confirm($form, &$form_state, $node) {
   // Always provide entity id in the same form key as in the entity edit form.
-  $form['nid'] = array('#type' => 'value', '#value' => $node->nid);
+  $form['nid'] = array('#type' => 'value', '#value' => $node->nid->value);
   return confirm_form($form,
     t('Are you sure you want to delete %title?', array('%title' => $node->label())),
-    'node/' . $node->nid,
+    'node/' . $node->nid->value,
     t('This action cannot be undone.'),
     t('Delete'),
     t('Cancel')
@@ -230,7 +230,7 @@ function node_delete_confirm_submit($form, &$form_state) {
   if ($form_state['values']['confirm']) {
     $node = node_load($form_state['values']['nid']);
     node_delete($form_state['values']['nid']);
-    watchdog('content', '@type: deleted %title.', array('@type' => $node->type, '%title' => $node->label()));
+    watchdog('content', '@type: deleted %title.', array('@type' => $node->type->value, '%title' => $node->label()));
     drupal_set_message(t('@type %title has been deleted.', array('@type' => node_get_type_label($node), '%title' => $node->label())));
   }
 
@@ -269,19 +269,19 @@ function node_revision_overview($node) {
     $operations = array();
 
     if ($revision->current_vid > 0) {
-      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/{$node->nid->value}"), '!username' => theme('username', array('account' => $revision))))
                                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : ''),
                      'class' => array('revision-current'));
       $operations[] = array('data' => drupal_placeholder(t('current revision')), 'class' => array('revision-current'), 'colspan' => 2);
     }
     else {
-      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/{$node->nid->value}/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision))))
                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : '');
       if ($revert_permission) {
-        $operations[] = l(t('revert'), "node/$node->nid/revisions/$revision->vid/revert");
+        $operations[] = l(t('revert'), "node/{$node->nid->value}/revisions/$revision->vid/revert");
       }
       if ($delete_permission) {
-        $operations[] = l(t('delete'), "node/$node->nid/revisions/$revision->vid/delete");
+        $operations[] = l(t('delete'), "node/{$node->nid->value}/revisions/$revision->vid/delete");
       }
     }
     $rows[] = array_merge($row, $operations);
@@ -315,7 +315,7 @@ function node_revision_overview($node) {
  */
 function node_revision_revert_confirm($form, $form_state, $node_revision) {
   $form['#node_revision'] = $node_revision;
-  return confirm_form($form, t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/' . $node_revision->nid . '/revisions', '', t('Revert'), t('Cancel'));
+  return confirm_form($form, t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp->value->getTimestamp()))), 'node/' . $node_revision->nid->value . '/revisions', '', t('Revert'), t('Cancel'));
 }
 
 /**
@@ -329,15 +329,15 @@ function node_revision_revert_confirm_submit($form, &$form_state) {
 
   // The revision timestamp will be updated when the revision is saved. Keep the
   // original one for the confirmation message.
-  $original_revision_timestamp = $node_revision->revision_timestamp;
+  $original_revision_timestamp = $node_revision->revision_timestamp->value->getTimestamp();
 
   $node_revision->log = t('Copy of the revision from %date.', array('%date' => format_date($original_revision_timestamp)));
 
   $node_revision->save();
 
-  watchdog('content', '@type: reverted %title revision %revision.', array('@type' => $node_revision->type, '%title' => $node_revision->label(), '%revision' => $node_revision->vid));
+  watchdog('content', '@type: reverted %title revision %revision.', array('@type' => $node_revision->type->value, '%title' => $node_revision->label(), '%revision' => $node_revision->vid->value));
   drupal_set_message(t('@type %title has been reverted back to the revision from %revision-date.', array('@type' => node_get_type_label($node_revision), '%title' => $node_revision->label(), '%revision-date' => format_date($original_revision_timestamp))));
-  $form_state['redirect'] = 'node/' . $node_revision->nid . '/revisions';
+  $form_state['redirect'] = 'node/' . $node_revision->nid->value . '/revisions';
 }
 
 /**
@@ -356,7 +356,7 @@ function node_revision_revert_confirm_submit($form, &$form_state) {
  */
 function node_revision_delete_confirm($form, $form_state, $node_revision) {
   $form['#node_revision'] = $node_revision;
-  return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/' . $node_revision->nid . '/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
+  return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp->value->getTimestamp()))), 'node/' . $node_revision->nid->value . '/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
 }
 
 /**
@@ -364,12 +364,12 @@ function node_revision_delete_confirm($form, $form_state, $node_revision) {
  */
 function node_revision_delete_confirm_submit($form, &$form_state) {
   $node_revision = $form['#node_revision'];
-  node_revision_delete($node_revision->vid);
+  node_revision_delete($node_revision->vid->value);
 
-  watchdog('content', '@type: deleted %title revision %revision.', array('@type' => $node_revision->type, '%title' => $node_revision->label(), '%revision' => $node_revision->vid));
-  drupal_set_message(t('Revision from %revision-date of @type %title has been deleted.', array('%revision-date' => format_date($node_revision->revision_timestamp), '@type' => node_get_type_label($node_revision), '%title' => $node_revision->label())));
-  $form_state['redirect'] = 'node/' . $node_revision->nid;
-  if (db_query('SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid', array(':nid' => $node_revision->nid))->fetchField() > 1) {
+  watchdog('content', '@type: deleted %title revision %revision.', array('@type' => $node_revision->type->value, '%title' => $node_revision->label(), '%revision' => $node_revision->vid->value));
+  drupal_set_message(t('Revision from %revision-date of @type %title has been deleted.', array('%revision-date' => format_date($node_revision->revision_timestamp->value->getTimestamp()), '@type' => node_get_type_label($node_revision), '%title' => $node_revision->label())));
+  $form_state['redirect'] = 'node/' . $node_revision->nid->value;
+  if (db_query('SELECT COUNT(vid) FROM {node_property_data_revision} WHERE nid = :nid', array(':nid' => $node_revision->nid->value))->fetchField() > 1) {
     $form_state['redirect'] .= '/revisions';
   }
 }
diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc
index 0bd1000..f2867ef 100644
--- a/core/modules/node/node.tokens.inc
+++ b/core/modules/node/node.tokens.inc
@@ -109,19 +109,19 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
       switch ($name) {
         // Simple key values on the node.
         case 'nid':
-          $replacements[$original] = $node->nid;
+          $replacements[$original] = $node->nid->value;
           break;
 
         case 'vid':
-          $replacements[$original] = $node->vid;
+          $replacements[$original] = $node->vid->value;
           break;
 
         case 'tnid':
-          $replacements[$original] = $node->tnid;
+          $replacements[$original] = $node->tnid->value;
           break;
 
         case 'type':
-          $replacements[$original] = $sanitize ? check_plain($node->type) : $node->type;
+          $replacements[$original] = $sanitize ? check_plain($node->type->value) : $node->type->value;
           break;
 
         case 'type-name':
@@ -130,59 +130,57 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
           break;
 
         case 'title':
-          $replacements[$original] = $sanitize ? check_plain($node->title) : $node->title;
+          $replacements[$original] = $sanitize ? check_plain($node->title->value) : $node->title->value;
           break;
 
         case 'body':
         case 'summary':
           if ($items = field_get_items('node', $node, 'body', $langcode)) {
             $column = ($name == 'body') ? 'value' : 'summary';
-            $instance = field_info_instance('node', 'body', $node->type);
+            $instance = field_info_instance('node', 'body', $node->type->value);
             $field_langcode = field_language('node', $node, 'body', $langcode);
             $replacements[$original] = $sanitize ? _text_sanitize($instance, $field_langcode, $items[0], $column) : $items[0][$column];
           }
           break;
 
         case 'langcode':
-          $replacements[$original] = $sanitize ? check_plain($node->langcode) : $node->langcode;
+          $replacements[$original] = $sanitize ? check_plain($node->langcode->value) : $node->langcode->value;
           break;
 
         case 'url':
-          $replacements[$original] = url('node/' . $node->nid, $url_options);
+          $replacements[$original] = url('node/' . $node->nid->value, $url_options);
           break;
 
         case 'edit-url':
-          $replacements[$original] = url('node/' . $node->nid . '/edit', $url_options);
+          $replacements[$original] = url('node/' . $node->nid->value . '/edit', $url_options);
           break;
 
         // Default values for the chained tokens handled below.
         case 'author':
-          $account = user_load($node->uid);
-          $name = user_format_name($account);
+          $name = user_format_name($node->uid->entity);
           $replacements[$original] = $sanitize ? check_plain($name) : $name;
           break;
 
         case 'created':
-          $replacements[$original] = format_date($node->created, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($node->created->value->getTimestamp(), 'medium', '', NULL, $langcode);
           break;
 
         case 'changed':
-          $replacements[$original] = format_date($node->changed, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($node->changed->value->getTimestamp(), 'medium', '', NULL, $langcode);
           break;
       }
     }
 
     if ($author_tokens = token_find_with_prefix($tokens, 'author')) {
-      $author = user_load($node->uid);
-      $replacements += token_generate('user', $author_tokens, array('user' => $author), $options);
+      $replacements += token_generate('user', $author_tokens, array('user' => $node->uid->entity), $options);
     }
 
     if ($created_tokens = token_find_with_prefix($tokens, 'created')) {
-      $replacements += token_generate('date', $created_tokens, array('date' => $node->created), $options);
+      $replacements += token_generate('date', $created_tokens, array('date' => $node->created->value->getTimestamp()), $options);
     }
 
     if ($changed_tokens = token_find_with_prefix($tokens, 'changed')) {
-      $replacements += token_generate('date', $changed_tokens, array('date' => $node->changed), $options);
+      $replacements += token_generate('date', $changed_tokens, array('date' => $node->changed->value->getTimestamp()), $options);
     }
   }
 
diff --git a/core/modules/node/templates/node.tpl.php b/core/modules/node/templates/node.tpl.php
index b1da4aa..456a7da 100644
--- a/core/modules/node/templates/node.tpl.php
+++ b/core/modules/node/templates/node.tpl.php
@@ -78,7 +78,7 @@
  * @ingroup themeable
  */
 ?>
-<article id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
+<article id="node-<?php print $node->nid->value; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
 
   <?php print render($title_prefix); ?>
   <?php if (!$page): ?>
diff --git a/core/modules/node/tests/modules/node_access_test/node_access_test.module b/core/modules/node/tests/modules/node_access_test/node_access_test.module
index a503217..6080db0 100644
--- a/core/modules/node/tests/modules/node_access_test/node_access_test.module
+++ b/core/modules/node/tests/modules/node_access_test/node_access_test.module
@@ -54,7 +54,7 @@ function node_access_test_node_access_records(Node $node) {
     // means there are many many groups of just 1 user.
     $grants[] = array(
       'realm' => 'node_access_test_author',
-      'gid' => $node->uid,
+      'gid' => $node->uid->value,
       'grant_view' => 1,
       'grant_update' => 1,
       'grant_delete' => 1,
@@ -205,7 +205,7 @@ function node_access_test_node_load($nodes, $types) {
  */
 
 function node_access_test_node_predelete(Node $node) {
-  db_delete('node_access_test')->condition('nid', $node->nid)->execute();
+  db_delete('node_access_test')->condition('nid', $node->nid->value)->execute();
 }
 
 /**
@@ -228,7 +228,7 @@ function node_access_test_node_update(Node $node) {
 function _node_access_test_node_write(Node $node) {
   if (isset($node->private)) {
     db_merge('node_access_test')
-      ->key(array('nid' => $node->nid))
+      ->key(array('nid' => $node->nid->value))
       ->fields(array('private' => (int) $node->private))
       ->execute();
   }
diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module
index 1686ff0..dc7fba6 100644
--- a/core/modules/node/tests/modules/node_test/node_test.module
+++ b/core/modules/node/tests/modules/node_test/node_test.module
@@ -32,13 +32,13 @@ function node_test_node_view(Node $node, $view_mode) {
     // Add RSS elements and namespaces when building the RSS feed.
     $node->rss_elements[] = array(
       'key' => 'testElement',
-      'value' => t('Value of testElement RSS element for node !nid.', array('!nid' => $node->nid)),
+      'value' => t('Value of testElement RSS element for node !nid.', array('!nid' => $node->nid->value)),
     );
     $node->rss_namespaces['xmlns:drupaltest'] = 'http://example.com/test-namespace';
 
     // Add content that should be displayed only in the RSS feed.
     $node->content['extra_feed_content'] = array(
-      '#markup' => '<p>' . t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->nid)) . '</p>',
+      '#markup' => '<p>' . t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->nid->value)) . '</p>',
       '#weight' => 10,
     );
   }
@@ -46,7 +46,7 @@ function node_test_node_view(Node $node, $view_mode) {
   if ($view_mode != 'rss') {
     // Add content that should NOT be displayed in the RSS feed.
     $node->content['extra_non_feed_content'] = array(
-      '#markup' => '<p>' . t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->nid)) . '</p>',
+      '#markup' => '<p>' . t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->nid->value)) . '</p>',
     );
   }
 }
@@ -74,7 +74,7 @@ function node_test_node_access_records(Node $node) {
     return;
   }
   $grants = array();
-  if ($node->type == 'article') {
+  if ($node->type->value == 'article') {
     // Create grant in arbitrary article_realm for article nodes.
     $grants[] = array(
       'realm' => 'test_article_realm',
@@ -85,7 +85,7 @@ function node_test_node_access_records(Node $node) {
       'priority' => 0,
     );
   }
-  elseif ($node->type == 'page') {
+  elseif ($node->type->value == 'page') {
     // Create grant in arbitrary page_realm for page nodes.
     $grants[] = array(
       'realm' => 'test_page_realm',
@@ -106,7 +106,7 @@ function node_test_node_access_records_alter(&$grants, Node $node) {
   if (!empty($grants)) {
     foreach ($grants as $key => $grant) {
       // Alter grant from test_page_realm to test_alter_realm and modify the gid.
-      if ($grant['realm'] == 'test_page_realm' && $node->promote) {
+      if ($grant['realm'] == 'test_page_realm' && $node->promote->value) {
         $grants[$key]['realm'] = 'test_alter_realm';
         $grants[$key]['gid'] = 2;
       }
@@ -126,15 +126,15 @@ function node_test_node_grants_alter(&$grants, $account, $op) {
  * Implements hook_node_presave().
  */
 function node_test_node_presave(Node $node) {
-  if ($node->title == 'testing_node_presave') {
+  if ($node->title->value == 'testing_node_presave') {
     // Sun, 19 Nov 1978 05:00:00 GMT
     $node->created = 280299600;
     // Drupal 1.0 release.
     $node->changed = 979534800;
   }
   // Determine changes.
-  if (!empty($node->original) && $node->original->title == 'test_changes') {
-    if ($node->original->title != $node->title) {
+  if (!empty($node->original) && $node->original->title->value == 'test_changes') {
+    if ($node->original->title->value != $node->title->value) {
       $node->title .= '_presave';
     }
   }
@@ -145,8 +145,8 @@ function node_test_node_presave(Node $node) {
  */
 function node_test_node_update(Node $node) {
   // Determine changes on update.
-  if (!empty($node->original) && $node->original->title == 'test_changes') {
-    if ($node->original->title != $node->title) {
+  if (!empty($node->original) && $node->original->title->value == 'test_changes') {
+    if ($node->original->title->value != $node->title->value) {
       $node->title .= '_update';
     }
   }
diff --git a/core/modules/node/tests/modules/node_test_exception/node_test_exception.module b/core/modules/node/tests/modules/node_test_exception/node_test_exception.module
index 570236b..cf80218 100644
--- a/core/modules/node/tests/modules/node_test_exception/node_test_exception.module
+++ b/core/modules/node/tests/modules/node_test_exception/node_test_exception.module
@@ -12,7 +12,7 @@
  * Implements hook_node_insert().
  */
 function node_test_exception_node_insert(Node $node) {
-  if ($node->title == 'testing_transaction_exception') {
+  if ($node->title->value == 'testing_transaction_exception') {
     throw new Exception('Test exception for rollback.');
   }
 }
diff --git a/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php b/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php
index 691c537..9816cd2 100644
--- a/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php
+++ b/core/modules/path/lib/Drupal/path/Tests/PathLanguageTest.php
@@ -60,14 +60,14 @@ function testAliasTranslation() {
     $edit = array();
     $edit['langcode'] = 'en';
     $edit['path[alias]'] = $english_alias;
-    $this->drupalPost('node/' . $english_node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $english_node->nid->value . '/edit', $edit, t('Save'));
 
     // Confirm that the alias works.
     $this->drupalGet($english_alias);
     $this->assertText($english_node->label(), 'Alias works.');
 
     // Translate the node into French.
-    $this->drupalGet('node/' . $english_node->nid . '/translate');
+    $this->drupalGet('node/' . $english_node->nid->value . '/translate');
     $this->clickLink(t('add translation'));
     $edit = array();
     $langcode = LANGUAGE_NOT_SPECIFIED;
@@ -94,7 +94,7 @@ function testAliasTranslation() {
     drupal_static_reset('language_url_outbound_alter');
     drupal_static_reset('language_url_rewrite_url');
     $languages = language_list();
-    $url = url('node/' . $french_node->nid, array('language' => $languages[$french_node->langcode]));
+    $url = url('node/' . $french_node->nid->value, array('language' => $languages[$french_node->langcode->value]));
     $this->assertTrue(strpos($url, $edit['path[alias]']), 'URL contains the path alias.');
 
     // Confirm that the alias works even when changing language negotiation
@@ -144,17 +144,17 @@ function testAliasTranslation() {
     // drupal_lookup_path() has an internal static cache. Check to see that
     // it has the appropriate contents at this point.
     drupal_lookup_path('wipe');
-    $french_node_path = drupal_lookup_path('source', $french_alias, $french_node->langcode);
-    $this->assertEqual($french_node_path, 'node/' . $french_node->nid, 'Normal path works.');
+    $french_node_path = drupal_lookup_path('source', $french_alias, $french_node->langcode->value);
+    $this->assertEqual($french_node_path, 'node/' . $french_node->nid->value, 'Normal path works.');
     // Second call should return the same path.
-    $french_node_path = drupal_lookup_path('source', $french_alias, $french_node->langcode);
-    $this->assertEqual($french_node_path, 'node/' . $french_node->nid, 'Normal path is the same.');
+    $french_node_path = drupal_lookup_path('source', $french_alias, $french_node->langcode->value);
+    $this->assertEqual($french_node_path, 'node/' . $french_node->nid->value, 'Normal path is the same.');
 
     // Confirm that the alias works.
-    $french_node_alias = drupal_lookup_path('alias', 'node/' . $french_node->nid, $french_node->langcode);
+    $french_node_alias = drupal_lookup_path('alias', 'node/' . $french_node->nid->value, $french_node->langcode->value);
     $this->assertEqual($french_node_alias, $french_alias, 'Alias works.');
     // Second call should return the same alias.
-    $french_node_alias = drupal_lookup_path('alias', 'node/' . $french_node->nid, $french_node->langcode);
+    $french_node_alias = drupal_lookup_path('alias', 'node/' . $french_node->nid->value, $french_node->langcode->value);
     $this->assertEqual($french_node_alias, $french_alias, 'Alias is the same.');
   }
 }
diff --git a/core/modules/path/path.module b/core/modules/path/path.module
index 6a69c13..8866981 100644
--- a/core/modules/path/path.module
+++ b/core/modules/path/path.module
@@ -102,10 +102,10 @@ function path_menu() {
 function path_form_node_form_alter(&$form, $form_state) {
   $node = $form_state['controller']->getEntity($form_state);
   $path = array();
-  if (!empty($node->nid)) {
-    $conditions = array('source' => 'node/' . $node->nid);
-    if ($node->langcode != LANGUAGE_NOT_SPECIFIED) {
-      $conditions['langcode'] = $node->langcode;
+  if (!empty($node->nid->value)) {
+    $conditions = array('source' => 'node/' . $node->nid->value);
+    if ($node->langcode->value != LANGUAGE_NOT_SPECIFIED) {
+      $conditions['langcode'] = $node->langcode->value;
     }
     $path = path_load($conditions);
     if ($path === FALSE) {
@@ -114,9 +114,9 @@ function path_form_node_form_alter(&$form, $form_state) {
   }
   $path += array(
     'pid' => NULL,
-    'source' => isset($node->nid) ? 'node/' . $node->nid : NULL,
+    'source' => isset($node->nid->value) ? 'node/' . $node->nid->value : NULL,
     'alias' => '',
-    'langcode' => isset($node->langcode) ? $node->langcode : LANGUAGE_NOT_SPECIFIED,
+    'langcode' => isset($node->langcode->value) ? $node->langcode->value : LANGUAGE_NOT_SPECIFIED,
   );
 
   $form['path'] = array(
@@ -195,8 +195,8 @@ function path_node_insert(Node $node) {
     // Only save a non-empty alias.
     if (!empty($path['alias'])) {
       // Ensure fields for programmatic executions.
-      $path['source'] = 'node/' . $node->nid;
-      $path['langcode'] = isset($node->langcode) ? $node->langcode : LANGUAGE_NOT_SPECIFIED;
+      $path['source'] = 'node/' . $node->nid->value;
+      $path['langcode'] = isset($node->langcode->value) ? $node->langcode->value : LANGUAGE_NOT_SPECIFIED;
       path_save($path);
     }
   }
@@ -216,8 +216,8 @@ function path_node_update(Node $node) {
     // Only save a non-empty alias.
     if (!empty($path['alias'])) {
       // Ensure fields for programmatic executions.
-      $path['source'] = 'node/' . $node->nid;
-      $path['langcode'] = isset($node->langcode) ? $node->langcode : LANGUAGE_NOT_SPECIFIED;
+      $path['source'] = 'node/' . $node->nid->value;
+      $path['langcode'] = isset($node->langcode->value) ? $node->langcode->value : LANGUAGE_NOT_SPECIFIED;
       path_save($path);
     }
   }
@@ -228,7 +228,7 @@ function path_node_update(Node $node) {
  */
 function path_node_predelete(Node $node) {
   // Delete all aliases associated with this node.
-  path_delete(array('source' => 'node/' . $node->nid));
+  path_delete(array('source' => 'node/' . $node->nid->value));
 }
 
 /**
diff --git a/core/modules/php/lib/Drupal/php/Tests/PhpAccessTest.php b/core/modules/php/lib/Drupal/php/Tests/PhpAccessTest.php
index f85c9f1..f0a702d 100644
--- a/core/modules/php/lib/Drupal/php/Tests/PhpAccessTest.php
+++ b/core/modules/php/lib/Drupal/php/Tests/PhpAccessTest.php
@@ -29,11 +29,11 @@ function testNoPrivileges() {
     $node = $this->createNodeWithCode();
 
     // Make sure that the PHP code shows up as text.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText('print', 'PHP code was not evaluated.');
 
     // Make sure that user doesn't have access to filter.
-    $this->drupalGet('node/' . $node->nid . '/edit');
+    $this->drupalGet('node/' . $node->nid->value . '/edit');
     $this->assertNoRaw('<option value="' . $this->php_code_format->format . '">', 'PHP code format not available.');
   }
 }
diff --git a/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php b/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php
index ffab8c5..3111aa4 100644
--- a/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php
+++ b/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php
@@ -32,14 +32,14 @@ function testPhpFilter() {
     $node = $this->createNodeWithCode();
 
     // Make sure that the PHP code shows up as text.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText('php print');
 
     // Change filter to PHP filter and see that PHP code is evaluated.
     $edit = array();
     $langcode = LANGUAGE_NOT_SPECIFIED;
     $edit["body[$langcode][0][format]"] = $this->php_code_format->format;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     $this->assertRaw(t('Basic page %title has been updated.', array('%title' => $node->label())), 'PHP code filter turned on.');
 
     // Make sure that the PHP code shows up as text.
diff --git a/core/modules/poll/lib/Drupal/poll/Tests/PollTestBase.php b/core/modules/poll/lib/Drupal/poll/Tests/PollTestBase.php
index 94da1ef..6128d7d 100644
--- a/core/modules/poll/lib/Drupal/poll/Tests/PollTestBase.php
+++ b/core/modules/poll/lib/Drupal/poll/Tests/PollTestBase.php
@@ -78,9 +78,9 @@ function pollCreate($title, $choices, $preview = TRUE) {
     $this->drupalPost(NULL, $edit, t('Save'));
     $node = $this->drupalGetNodeByTitle($title);
     $this->assertText(t('@type @title has been created.', array('@type' => node_type_get_label('poll'), '@title' => $title)), 'Poll has been created.');
-    $this->assertTrue($node->nid, 'Poll has been found in the database.');
+    $this->assertTrue($node->nid->value, 'Poll has been found in the database.');
 
-    return isset($node->nid) ? $node->nid : FALSE;
+    return isset($node->nid->value) ? $node->nid->value : FALSE;
   }
 
   /**
diff --git a/core/modules/poll/poll.module b/core/modules/poll/poll.module
index c85f121..c7d7d33 100644
--- a/core/modules/poll/poll.module
+++ b/core/modules/poll/poll.module
@@ -115,7 +115,7 @@ function poll_menu() {
  *   TRUE if the user can view votes, and FALSE if the user cannot view votes.
  */
 function _poll_menu_access($node, $perm, $inspect_allowvotes) {
-  return user_access($perm) && ($node->type == 'poll') && ($node->allowvotes || !$inspect_allowvotes);
+  return user_access($perm) && ($node->type->value == 'poll') && ($node->allowvotes || !$inspect_allowvotes);
 }
 
 /**
@@ -229,9 +229,9 @@ function poll_field_extra_fields() {
 function poll_form(Node $node, &$form_state) {
   global $user;
 
-  $admin = user_access('bypass node access') || user_access('edit any poll content') || (user_access('edit own poll content') && $user->uid == $node->uid);
+  $admin = user_access('bypass node access') || user_access('edit any poll content') || (user_access('edit own poll content') && $user->uid == $node->uid->value);
 
-  $type = node_type_load($node->type);
+  $type = node_type_load($node->type->value);
 
   // The submit handlers to add more poll choices require that this form is
   // cached, regardless of whether Ajax is used.
@@ -241,7 +241,7 @@ function poll_form(Node $node, &$form_state) {
     '#type' => 'textfield',
     '#title' => check_plain($type->title_label),
     '#required' => TRUE,
-    '#default_value' => $node->title,
+    '#default_value' => $node->title->value,
     '#weight' => -5,
   );
 
@@ -483,7 +483,7 @@ function poll_field_attach_prepare_translation_alter(&$entity, $context) {
 function poll_load($nodes) {
   global $user;
   foreach ($nodes as $node) {
-    $poll = db_query("SELECT runtime, active FROM {poll} WHERE nid = :nid", array(':nid' => $node->nid))->fetchObject();
+    $poll = db_query("SELECT runtime, active FROM {poll} WHERE nid = :nid", array(':nid' => $node->nid->value))->fetchObject();
 
     if (empty($poll)) {
       $poll = new stdClass();
@@ -493,7 +493,7 @@ function poll_load($nodes) {
     $poll->choice = db_select('poll_choice', 'c')
       ->addTag('translatable')
       ->fields('c', array('chid', 'chtext', 'chvotes', 'weight'))
-      ->condition('c.nid', $node->nid)
+      ->condition('c.nid', $node->nid->value)
       ->orderBy('weight')
       ->execute()->fetchAllAssoc('chid', PDO::FETCH_ASSOC);
 
@@ -502,25 +502,25 @@ function poll_load($nodes) {
     if (user_access('vote on polls') && $poll->active) {
       if ($user->uid) {
         // If authenticated, find existing vote based on uid.
-        $poll->vote = db_query('SELECT chid FROM {poll_vote} WHERE nid = :nid AND uid = :uid', array(':nid' => $node->nid, ':uid' => $user->uid))->fetchField();
+        $poll->vote = db_query('SELECT chid FROM {poll_vote} WHERE nid = :nid AND uid = :uid', array(':nid' => $node->nid->value, ':uid' => $user->uid))->fetchField();
         if (empty($poll->vote)) {
           $poll->vote = -1;
           $poll->allowvotes = TRUE;
         }
       }
-      elseif (!empty($_SESSION['poll_vote'][$node->nid])) {
+      elseif (!empty($_SESSION['poll_vote'][$node->nid->value])) {
         // Otherwise the user is anonymous. Look for an existing vote in the
         // user's session.
-        $poll->vote = $_SESSION['poll_vote'][$node->nid];
+        $poll->vote = $_SESSION['poll_vote'][$node->nid->value];
       }
       else {
         // Finally, query the database for an existing vote based on anonymous
         // user's hostname.
-        $poll->allowvotes = !db_query("SELECT 1 FROM {poll_vote} WHERE nid = :nid AND hostname = :hostname AND uid = 0", array(':nid' => $node->nid, ':hostname' => ip_address()))->fetchField();
+        $poll->allowvotes = !db_query("SELECT 1 FROM {poll_vote} WHERE nid = :nid AND hostname = :hostname AND uid = 0", array(':nid' => $node->nid->value, ':hostname' => ip_address()))->fetchField();
       }
     }
     foreach ($poll as $key => $value) {
-      $nodes[$node->nid]->$key = $value;
+      $nodes[$node->nid->value]->$key = $value;
     }
   }
 }
@@ -539,7 +539,7 @@ function poll_insert($node) {
 
   db_insert('poll')
     ->fields(array(
-      'nid' => $node->nid,
+      'nid' => $node->nid->value,
       'runtime' => $node->runtime,
       'active' => $node->active,
     ))
@@ -549,7 +549,7 @@ function poll_insert($node) {
     if ($choice['chtext'] != '') {
       db_insert('poll_choice')
         ->fields(array(
-          'nid' => $node->nid,
+          'nid' => $node->nid->value,
           'chtext' => $choice['chtext'],
           'chvotes' => $choice['chvotes'],
           'weight' => $choice['weight'],
@@ -569,7 +569,7 @@ function poll_update($node) {
       'runtime' => $node->runtime,
       'active' => $node->active,
     ))
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 
   // Poll choices with empty titles signifies removal. We remove all votes to
@@ -584,7 +584,7 @@ function poll_update($node) {
           'weight' => $choice['weight'],
         ))
         ->insertFields(array(
-          'nid' => $node->nid,
+          'nid' => $node->nid->value,
           'chtext' => $choice['chtext'],
           'chvotes' => (int) $choice['chvotes'],
           'weight' => $choice['weight'],
@@ -593,11 +593,11 @@ function poll_update($node) {
     }
     else {
       db_delete('poll_vote')
-        ->condition('nid', $node->nid)
+        ->condition('nid', $node->nid->value)
         ->condition('chid', $key)
         ->execute();
       db_delete('poll_choice')
-        ->condition('nid', $node->nid)
+        ->condition('nid', $node->nid->value)
         ->condition('chid', $choice['chid'])
         ->execute();
     }
@@ -609,13 +609,13 @@ function poll_update($node) {
  */
 function poll_delete($node) {
   db_delete('poll')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
   db_delete('poll_choice')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
   db_delete('poll_vote')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
@@ -646,7 +646,7 @@ function poll_block_latest_poll_view(Node $node) {
   $links = array();
   $links[] = array('title' => t('Older polls'), 'href' => 'poll', 'attributes' => array('title' => t('View the list of polls on this site.')));
   if ($node->allowvotes) {
-    $links[] = array('title' => t('Results'), 'href' => 'node/' . $node->nid . '/results', 'attributes' => array('title' => t('View the current poll results.')));
+    $links[] = array('title' => t('Results'), 'href' => 'node/' . $node->nid->value . '/results', 'attributes' => array('title' => t('View the current poll results.')));
   }
 
   $node->links = $links;
@@ -777,7 +777,7 @@ function poll_vote($form, &$form_state) {
   global $user;
   db_insert('poll_vote')
     ->fields(array(
-      'nid' => $node->nid,
+      'nid' => $node->nid->value,
       'chid' => $choice,
       'uid' => $user->uid,
       'hostname' => ip_address(),
@@ -799,7 +799,7 @@ function poll_vote($form, &$form_state) {
     // convenient side effect of preventing the user from hitting the page
     // cache. When anonymous voting is allowed, the page cache should only
     // contain the voting form, not the results.
-    $_SESSION['poll_vote'][$node->nid] = $choice;
+    $_SESSION['poll_vote'][$node->nid->value] = $choice;
   }
 
   drupal_set_message(t('Your vote was recorded.'));
@@ -822,7 +822,7 @@ function poll_preprocess_block(&$variables) {
 function template_preprocess_poll_vote(&$variables) {
   $form = $variables['form'];
   $variables['choice'] = drupal_render($form['choice']);
-  $variables['title'] = check_plain($form['#node']->title);
+  $variables['title'] = check_plain($form['#node']->title->value);
   $variables['vote'] = drupal_render($form['vote']);
   $variables['rest'] = drupal_render_children($form);
   $variables['block'] = $form['#block'];
@@ -870,7 +870,7 @@ function poll_view_results($node, $view_mode, $block = FALSE) {
     );
   }
 
-  return theme('poll_results', array('raw_title' => $node->label(), 'results' => drupal_render($poll_results), 'votes' => $total_votes, 'raw_links' => isset($node->links) ? $node->links : array(), 'block' => $block, 'nid' => $node->nid, 'vote' => isset($node->vote) ? $node->vote : NULL));
+  return theme('poll_results', array('raw_title' => $node->label(), 'results' => drupal_render($poll_results), 'votes' => $total_votes, 'raw_links' => isset($node->links) ? $node->links : array(), 'block' => $block, 'nid' => $node->nid->value, 'vote' => isset($node->vote) ? $node->vote : NULL));
 }
 
 
@@ -990,7 +990,7 @@ function poll_cancel($form, &$form_state) {
   $node = node_load($form['#nid']);
 
   db_delete('poll_vote')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->condition($user->uid ? 'uid' : 'hostname', $user->uid ? $user->uid : ip_address())
     ->execute();
 
@@ -1000,7 +1000,7 @@ function poll_cancel($form, &$form_state) {
     ->condition('chid', $node->vote)
     ->execute();
 
-  unset($_SESSION['poll_vote'][$node->nid]);
+  unset($_SESSION['poll_vote'][$node->nid->value]);
 
   drupal_set_message(t('Your vote was cancelled.'));
 }
diff --git a/core/modules/poll/poll.pages.inc b/core/modules/poll/poll.pages.inc
index b67d8f9..e7cf1d4 100644
--- a/core/modules/poll/poll.pages.inc
+++ b/core/modules/poll/poll.pages.inc
@@ -44,7 +44,7 @@ function poll_page() {
   $output = '<ul>';
   // Do not use $node->label() here because $node comes from the database.
   foreach ($queried_nodes as $node) {
-    $output .= '<li>' . l($node->title, "node/$node->nid") . ' - ' . format_plural($node->votes, '1 vote', '@count votes') . ' - ' . ($node->active ? t('open') : t('closed')) . '</li>';
+    $output .= '<li>' . l($node->title->value, 'node/' . $node->nid->value) . ' - ' . format_plural($node->votes, '1 vote', '@count votes') . ' - ' . ($node->active ? t('open') : t('closed')) . '</li>';
   }
   $output .= '</ul>';
   $output .= theme('pager');
@@ -82,7 +82,7 @@ function poll_votes($node) {
     ->fields('pv', array('chid', 'uid', 'hostname', 'timestamp', 'nid'))
     ->fields('pc', array('chtext'))
     ->fields('u', array('name'))
-    ->condition('pv.nid', $node->nid)
+    ->condition('pv.nid', $node->nid->value)
     ->limit($votes_per_page)
     ->orderByHeader($header)
     ->execute();
diff --git a/core/modules/poll/poll.tokens.inc b/core/modules/poll/poll.tokens.inc
index e0f9b2b..ebe83af 100644
--- a/core/modules/poll/poll.tokens.inc
+++ b/core/modules/poll/poll.tokens.inc
@@ -50,7 +50,7 @@ function poll_tokens($type, $tokens, array $data = array(), array $options = arr
 
   $replacements = array();
 
-  if ($type == 'node' && !empty($data['node']) && $data['node']->type == 'poll') {
+  if ($type == 'node' && !empty($data['node']) && $data['node']->type->value == 'poll') {
     $node = $data['node'];
 
     $total_votes = 0;
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
index 9db4a00..090b2da 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
@@ -37,13 +37,13 @@ public static function getInfo() {
    */
   function testAttributesInMarkup1() {
     $node = $this->drupalCreateNode(array('type' => 'article'));
-    $isoDate = date('c', $node->changed);
-    $url = url('node/' . $node->nid);
-    $this->drupalGet('node/' . $node->nid);
+    $isoDate = date('c', $node->changed->value->getTimestamp());
+    $url = url('node/' . $node->nid->value);
+    $this->drupalGet('node/' . $node->nid->value);
 
     // Ensure the default bundle mapping for node is used. These attributes come
     // from the node default bundle definition.
-    $node_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
+    $node_title = $this->xpath("//meta[@property='dc:title' and @content='{$node->title->value}']");
     $node_meta = $this->xpath("//div[(@about='$url')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
     $this->assertTrue(!empty($node_title), t('Property dc:title is present in meta tag.'));
     $this->assertTrue(!empty($node_meta), t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));
@@ -58,12 +58,12 @@ function testAttributesInMarkup1() {
   function testAttributesInMarkup2() {
     $type = $this->drupalCreateContentType(array('type' => 'test_bundle_hook_install'));
     $node = $this->drupalCreateNode(array('type' => 'test_bundle_hook_install'));
-    $isoDate = date('c', $node->changed);
-    $url = url('node/' . $node->nid);
-    $this->drupalGet('node/' . $node->nid);
+    $isoDate = date('c', $node->changed->value->getTimestamp());
+    $url = url('node/' . $node->nid->value);
+    $this->drupalGet('node/' . $node->nid->value);
 
     // Ensure the mapping defined in rdf_module.test is used.
-    $test_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
+    $test_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='{$node->title->value}']");
     $test_bundle_meta = $this->xpath("//div[(@about='$url') and contains(@typeof, 'foo:mapping_install1') and contains(@typeof, 'bar:mapping_install2')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
     $this->assertTrue(!empty($test_bundle_title), t('Property dc:title is present in meta tag.'));
     $this->assertTrue(!empty($test_bundle_meta), t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));
@@ -78,13 +78,13 @@ function testAttributesInMarkup2() {
   function testAttributesInMarkup3() {
     $type = $this->drupalCreateContentType();
     $node = $this->drupalCreateNode(array('type' => $type->type));
-    $isoDate = date('c', $node->changed);
-    $url = url('node/' . $node->nid);
-    $this->drupalGet('node/' . $node->nid);
+    $isoDate = date('c', $node->changed->value->getTimestamp());
+    $url = url('node/' . $node->nid->value);
+    $this->drupalGet('node/' . $node->nid->value);
 
     // Ensure the default bundle mapping for node is used. These attributes come
     // from the node default bundle definition.
-    $random_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
+    $random_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='{$node->title->value}']");
     $random_bundle_meta = $this->xpath("//div[(@about='$url') and contains(@typeof, 'sioc:Item') and contains(@typeof, 'foaf:Document')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
     $this->assertTrue(!empty($random_bundle_title), t('Property dc:title is present in meta tag.'));
     $this->assertTrue(!empty($random_bundle_meta), t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));
@@ -130,7 +130,7 @@ function testUserAttributesInMarkup() {
     $this->drupalLogin($user2);
     $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1));
     $this->drupalLogin($user1);
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     // Ensures the default bundle mapping for user is used on the Authored By
     // information on the node.
     $author_about = $this->xpath('//a[@typeof="sioc:UserAccount" and @about=:account-uri and @property="foaf:name" and contains(@lang, "")]', array(
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php
index 8c3b398..60579dd 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php
@@ -144,12 +144,12 @@ function testAttributesInMarkupFile() {
 
     // Create node and save, then edit node to upload files.
     $node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1));
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
     // Get filenames and nid for comparison with HTML output.
     $file_filename = $file->filename;
     $image_filename = $image->filename;
-    $nid = $node->nid;
+    $nid = $node->nid->value;
     // Navigate to front page, where node is displayed in teaser form.
     $this->drupalGet('node');
 
@@ -171,16 +171,16 @@ function testAttributesInMarkupFile() {
     $tag2 = $this->randomName(8);
     $edit = array();
     $edit['field_tags[' . LANGUAGE_NOT_SPECIFIED . ']'] = "$tag1, $tag2";
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     // Ensures the RDFa markup for the relationship between the node and its
     // tags is correct.
     $term_rdfa_meta = $this->xpath('//div[@about=:node-url and contains(@typeof, "sioc:Item") and contains(@typeof, "foaf:Document")]//ul[@class="links"]/li[@rel="dc:subject"]/a[@typeof="skos:Concept" and text()=:term-name]', array(
-      ':node-url' => url('node/' . $node->nid),
+      ':node-url' => url('node/' . $node->nid->value),
       ':term-name' => $tag1,
     ));
     $this->assertTrue(!empty($term_rdfa_meta), t('Property dc:subject is present for the tag1 field item.'));
     $term_rdfa_meta = $this->xpath('//div[@about=:node-url and contains(@typeof, "sioc:Item") and contains(@typeof, "foaf:Document")]//ul[@class="links"]/li[@rel="dc:subject"]/a[@typeof="skos:Concept" and text()=:term-name]', array(
-      ':node-url' => url('node/' . $node->nid),
+      ':node-url' => url('node/' . $node->nid->value),
       ':term-name' => $tag2,
     ));
     $this->assertTrue(!empty($term_rdfa_meta), t('Property dc:subject is present for the tag2 field item.'));
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/TrackerAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/TrackerAttributesTest.php
index e4f6fe4..f7b576c 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/TrackerAttributesTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/TrackerAttributesTest.php
@@ -72,7 +72,7 @@ function testAttributesInTracker() {
    * The node just created.
    */
   function _testBasicTrackerRdfaMarkup(Node $node) {
-    $url = url('node/' . $node->nid);
+    $url = url('node/' . $node->nid->value);
 
     $user = ($node->uid == 0) ? 'Anonymous user' : 'Registered user';
 
@@ -109,7 +109,7 @@ function _testBasicTrackerRdfaMarkup(Node $node) {
     // Tests that the appropriate RDFa markup to annotate the latest activity
     // date has been added to the tracker output before comments have been
     // posted, meaning the latest activity reflects changes to the node itself.
-    $isoDate = date('c', $node->changed);
+    $isoDate = date('c', $node->changed->value->getTimestamp());
     $tracker_activity = $this->xpath('//tr[@about=:url]//td[contains(@property, "dc:modified") and contains(@property, "sioc:last_activity_date") and contains(@datatype, "xsd:dateTime") and @content=:date]', array(':url' => $url, ':date' => $isoDate));
     $this->assertTrue(!empty($tracker_activity), t('Latest activity date and changed properties found when there are no comments on @user content. Latest activity date content is correct.', array('@user'=> $user)));
 
@@ -119,7 +119,7 @@ function _testBasicTrackerRdfaMarkup(Node $node) {
       'subject' => $this->randomName(),
       'comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][value]' => $this->randomName(),
     );
-    $this->drupalPost('comment/reply/' . $node->nid, $comment, t('Save'));
+    $this->drupalPost('comment/reply/' . $node->nid->value, $comment, t('Save'));
     $this->drupalGet('tracker');
 
     // Tests whether the property has been set for number of comments.
@@ -128,9 +128,9 @@ function _testBasicTrackerRdfaMarkup(Node $node) {
 
     // Need to query database directly to obtain last_activity_date because
     // it cannot be accessed via node_load().
-    $result = db_query('SELECT t.changed FROM {tracker_node} t WHERE t.nid = (:nid)', array(':nid' => $node->nid));
+    $result = db_query('SELECT t.changed FROM {tracker_node} t WHERE t.nid = (:nid)', array(':nid' => $node->nid->value));
     foreach ($result as $node) {
-      $expected_last_activity_date = $node->changed;
+      $expected_last_activity_date = $node->changed->value->getTimestamp();
     }
     $isoDate = date('c', $expected_last_activity_date);
     $tracker_activity = $this->xpath('//tr[@about=:url]//td[@property="sioc:last_activity_date" and @datatype="xsd:dateTime" and @content=:date]', array(':url' => $url, ':date' => $isoDate));
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchAdvancedSearchFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchAdvancedSearchFormTest.php
index db55981..14d6cd4 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchAdvancedSearchFormTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchAdvancedSearchFormTest.php
@@ -42,7 +42,7 @@ function setUp() {
    * Test using the advanced search form to limit search to nodes of type "Basic page".
    */
   function testNodeType() {
-    $this->assertTrue($this->node->type == 'page', t('Node type is Basic page.'));
+    $this->assertTrue($this->node->type->value == 'page', t('Node type is Basic page.'));
 
     // Assert that the dummy title doesn't equal the real title.
     $dummy_title = 'Lorem ipsum';
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
index 8df2e99..dae51b3 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
@@ -78,7 +78,7 @@ function testSearchResultsComment() {
     $edit_comment['comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][value]'] = '<h1>' . $comment_body . '</h1>';
     $full_html_format_id = 'full_html';
     $edit_comment['comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][format]'] = $full_html_format_id;
-    $this->drupalPost('comment/reply/' . $node->nid, $edit_comment, t('Save'));
+    $this->drupalPost('comment/reply/' . $node->nid->value, $edit_comment, t('Save'));
 
     // Invoke search index update.
     $this->drupalLogout();
@@ -89,7 +89,7 @@ function testSearchResultsComment() {
       'search_block_form' => "'" . $edit_comment['subject'] . "'",
     );
     $this->drupalPost('', $edit, t('Search'));
-    $node2 = node_load($node->nid, TRUE);
+    $node2 = node_load($node->nid->value, TRUE);
     $this->assertText($node2->label(), t('Node found in search results.'));
     $this->assertText($edit_comment['subject'], t('Comment subject found in search results.'));
 
@@ -137,7 +137,7 @@ function testSearchResultsCommentAccess() {
     $edit_comment = array();
     $edit_comment['subject'] = $this->comment_subject;
     $edit_comment['comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][value]'] = '<h1>' . $comment_body . '</h1>';
-    $this->drupalPost('comment/reply/' . $this->node->nid, $edit_comment, t('Save'));
+    $this->drupalPost('comment/reply/' . $this->node->nid->value, $edit_comment, t('Save'));
 
     $this->drupalLogout();
     $this->setRolePermissions(DRUPAL_ANONYMOUS_RID);
@@ -193,7 +193,7 @@ function setRolePermissions($rid, $access_comments = FALSE, $search_content = TR
    */
   function assertCommentAccess($assume_access, $message) {
     // Invoke search index update.
-    search_touch_node($this->node->nid);
+    search_touch_node($this->node->nid->value);
     $this->cronRun();
 
     // Search for the comment subject.
@@ -230,7 +230,7 @@ function testAddNewComment() {
     $node = $this->drupalCreateNode($settings);
     // Verify that if you view the node on its own page, 'add new comment'
     // is there.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText(t('Add new comment'), t('Add new comment appears on node page'));
 
     // Run cron to index this page.
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
index 7c123a0..f130962 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
@@ -44,8 +44,8 @@ function setUp() {
     // also needs the word "pizza" so we can use it as the search keyword.
     $langcode = LANGUAGE_NOT_SPECIFIED;
     $body_key = "body[$langcode][0][value]";
-    $edit[$body_key] = l($node->label(), 'node/' . $node->nid) . ' pizza sandwich';
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $edit[$body_key] = l($node->label(), 'node/' . $node->nid->value) . ' pizza sandwich';
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
     node_update_index();
     search_update_totals();
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php
index b423c75..9e9c99a 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php
@@ -121,7 +121,7 @@ function testSearchingMultilingualFieldValues() {
       $body_language_variant = end($node->body);
       $search_result = node_search_execute($body_language_variant[0]['value']);
       // See whether we get the same node as a result.
-      $this->assertEqual($search_result[0]['node']->nid, $node->nid, 'The search has resulted the correct node.');
+      $this->assertEqual($search_result[0]['node']->nid->value, $node->nid->value, 'The search has resulted the correct node.');
     }
   }
 }
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
index a57e483..d261c85 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
@@ -98,7 +98,7 @@ function testRankings() {
 
       // Do the search and assert the results.
       $set = node_search_execute('rocks');
-      $this->assertEqual($set[0]['node']->nid, $nodes[$node_rank][1]->nid, 'Search ranking "' . $node_rank . '" order.');
+      $this->assertEqual($set[0]['node']->nid->value, $nodes[$node_rank][1]->nid, 'Search ranking "' . $node_rank . '" order.');
     }
   }
 
@@ -159,9 +159,9 @@ function testHTMLRankings() {
     foreach ($sorted_tags as $tag_rank => $tag) {
       // Assert the results.
       if ($tag == 'notag') {
-        $this->assertEqual($set[$tag_rank]['node']->nid, $nodes[$tag]->nid, 'Search tag ranking for plain text order.');
+        $this->assertEqual($set[$tag_rank]['node']->nid->value, $nodes[$tag]->nid->value, 'Search tag ranking for plain text order.');
       } else {
-        $this->assertEqual($set[$tag_rank]['node']->nid, $nodes[$tag]->nid, 'Search tag ranking for "&lt;' . $sorted_tags[$tag_rank] . '&gt;" order.');
+        $this->assertEqual($set[$tag_rank]['node']->nid->value, $nodes[$tag]->nid->value, 'Search tag ranking for "&lt;' . $sorted_tags[$tag_rank] . '&gt;" order.');
       }
     }
 
@@ -184,10 +184,10 @@ function testHTMLRankings() {
       $set = array_slice($set, -2, 1);
 
       // Assert the results.
-      $this->assertEqual($set[0]['node']->nid, $node->nid, 'Search tag ranking for "&lt;' . $tag . '&gt;" order.');
+      $this->assertEqual($set[0]['node']->nid->value, $node->nid->value, 'Search tag ranking for "&lt;' . $tag . '&gt;" order.');
 
       // Delete node so it doesn't show up in subsequent search results.
-      node_delete($node->nid);
+      node_delete($node->nid->value);
     }
   }
 
@@ -227,6 +227,6 @@ function testDoubleRankings() {
 
     // Do the search and assert the results.
     $set = node_search_execute('rocks');
-    $this->assertEqual($set[0]['node']->nid, $node->nid, 'Search double ranking order.');
+    $this->assertEqual($set[0]['node']->nid->value, $node->nid->value, 'Search double ranking order.');
   }
 }
diff --git a/core/modules/search/search.api.php b/core/modules/search/search.api.php
index 3dcea0d..e7c6248 100644
--- a/core/modules/search/search.api.php
+++ b/core/modules/search/search.api.php
@@ -241,13 +241,13 @@ function hook_search_execute($keys = NULL, $conditions = NULL) {
       'link' => url($uri['path'], array_merge($uri['options'], array('absolute' => TRUE, 'language' => $language))),
       'type' => check_plain(node_get_type_label($node)),
       'title' => $node->label($item->langcode),
-      'user' => theme('username', array('account' => $node)),
+      'user' => theme('username', array('account' => $node->uid->entity)),
       'date' => $node->get('changed', $item->langcode),
       'node' => $node,
       'extra' => $extra,
       'score' => $item->calculated_score,
       'snippet' => search_excerpt($keys, $node->rendered, $item->langcode),
-      'langcode' => $node->langcode,
+      'langcode' => $node->langcode->value,
     );
   }
   return $results;
@@ -355,11 +355,11 @@ function hook_update_index() {
   $result = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit);
 
   foreach ($result as $node) {
-    $node = node_load($node->nid);
+    $node = node_load($node->nid->value);
 
     // Save the changed time of the most recent indexed node, for the search
     // results half-life calculation.
-    variable_set('node_cron_last', $node->changed);
+    variable_set('node_cron_last', $node->changed->value->getTimestamp());
 
     // Render the node.
     node_build_content($node, 'search_index');
@@ -374,7 +374,7 @@ function hook_update_index() {
     }
 
     // Update index
-    search_index($node->nid, 'node', $text);
+    search_index($node->nid->value, 'node', $text);
   }
 }
 /**
diff --git a/core/modules/search/search.module b/core/modules/search/search.module
index 315ae7a..859af4b 100644
--- a/core/modules/search/search.module
+++ b/core/modules/search/search.module
@@ -650,7 +650,7 @@ function search_index($sid, $module, $text, $langcode) {
                 $node = db_query('SELECT title, nid, vid FROM {node} WHERE nid = :nid', array(':nid' => $linknid), array('target' => 'slave'))->fetchObject();
                 $link = TRUE;
                 // Do not use $node->label(), $node comes from the database.
-                $linktitle = $node->title;
+                $linktitle = $node->title->value;
               }
             }
           }
@@ -808,7 +808,7 @@ function search_touch_node($nid) {
  */
 function search_node_update_index(Node $node) {
   // Transplant links to a node into the target node.
-  $result = db_query("SELECT caption FROM {search_node_links} WHERE nid = :nid", array(':nid' => $node->nid), array('target' => 'slave'));
+  $result = db_query("SELECT caption FROM {search_node_links} WHERE nid = :nid", array(':nid' => $node->nid->value), array('target' => 'slave'));
   $output = array();
   foreach ($result as $link) {
     $output[] = $link->caption;
@@ -824,7 +824,7 @@ function search_node_update_index(Node $node) {
 function search_node_update(Node $node) {
   // Reindex the node when it is updated. The node is automatically indexed
   // when it is added, simply by being added to the node table.
-  search_touch_node($node->nid);
+  search_touch_node($node->nid->value);
 }
 
 /**
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php
index 54eeab4..c83c32a 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php
@@ -28,7 +28,7 @@ function testShortcutLinkAdd() {
 
     // Create an alias for the node so we can test aliases.
     $path = array(
-      'source' => 'node/' . $this->node->nid,
+      'source' => 'node/' . $this->node->nid->value,
       'alias' => $this->randomName(8),
     );
     path_save($path);
@@ -38,7 +38,7 @@ function testShortcutLinkAdd() {
       array('path' => ''),
       array('path' => 'admin'),
       array('path' => 'admin/config/system/site-information'),
-      array('path' => "node/{$this->node->nid}/edit"),
+      array('path' => "node/{$this->node->nid->value}/edit"),
       array('path' => $path['alias']),
     );
 
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 24bf1f2..38401e8 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -239,8 +239,8 @@ protected function drupalCreateNode($settings = array()) {
 
     // Small hack to link revisions to our test user.
     db_update('node_revision')
-      ->fields(array('uid' => $node->uid))
-      ->condition('vid', $node->vid)
+      ->fields(array('uid' => $node->uid->value))
+      ->condition('vid', $node->vid->value)
       ->execute();
     return $node;
   }
diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php
index 6824e34..c189dd1 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsAdminTest.php
@@ -77,9 +77,9 @@ function testStatisticsSettings() {
     $this->assertTrue($config->get('count_content_views'), 'Count content view log is enabled.');
 
     // Hit the node.
-    $this->drupalGet('node/' . $this->test_node->nid);
+    $this->drupalGet('node/' . $this->test_node->nid->value);
     // Manually calling statistics.php, simulating ajax behavior.
-    $nid = $this->test_node->nid;
+    $nid = $this->test_node->nid->value;
     $post = http_build_query(array('nid' => $nid));
     $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
     global $base_url;
@@ -91,11 +91,11 @@ function testStatisticsSettings() {
 
     // Hit the node again (the counter is incremented after the hit, so
     // "1 view" will actually be shown when the node is hit the second time).
-    $this->drupalGet('node/' . $this->test_node->nid);
+    $this->drupalGet('node/' . $this->test_node->nid->value);
     drupal_http_request($stats_path, array('method' => 'POST', 'data' => $post, 'headers' => $headers, 'timeout' => 10000));
     $this->assertText('1 view', 'Node is viewed once.');
 
-    $this->drupalGet('node/' . $this->test_node->nid);
+    $this->drupalGet('node/' . $this->test_node->nid->value);
     drupal_http_request($stats_path, array('method' => 'POST', 'data' => $post, 'headers' => $headers, 'timeout' => 10000));
     $this->assertText('2 views', 'Node is viewed 2 times.');
   }
@@ -106,9 +106,9 @@ function testStatisticsSettings() {
   function testDeleteNode() {
     config('statistics.settings')->set('count_content_views', 1)->save();
 
-    $this->drupalGet('node/' . $this->test_node->nid);
+    $this->drupalGet('node/' . $this->test_node->nid->value);
     // Manually calling statistics.php, simulating ajax behavior.
-    $nid = $this->test_node->nid;
+    $nid = $this->test_node->nid->value;
     $post = http_build_query(array('nid' => $nid));
     $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
     global $base_url;
@@ -117,16 +117,16 @@ function testDeleteNode() {
 
     $result = db_select('node_counter', 'n')
       ->fields('n', array('nid'))
-      ->condition('n.nid', $this->test_node->nid)
+      ->condition('n.nid', $this->test_node->nid->value)
       ->execute()
       ->fetchAssoc();
-    $this->assertEqual($result['nid'], $this->test_node->nid, 'Verifying that the node counter is incremented.');
+    $this->assertEqual($result['nid'], $this->test_node->nid->value, 'Verifying that the node counter is incremented.');
 
-    node_delete($this->test_node->nid);
+    node_delete($this->test_node->nid->value);
 
     $result = db_select('node_counter', 'n')
       ->fields('n', array('nid'))
-      ->condition('n.nid', $this->test_node->nid)
+      ->condition('n.nid', $this->test_node->nid->value)
       ->execute()
       ->fetchAssoc();
     $this->assertFalse($result, 'Verifying that the node counter is deleted.');
@@ -142,7 +142,7 @@ function testDeleteUser() {
     $this->drupalLogout($this->privileged_user);
     $account = $this->drupalCreateUser(array('access content', 'cancel account'));
     $this->drupalLogin($account);
-    $this->drupalGet('node/' . $this->test_node->nid);
+    $this->drupalGet('node/' . $this->test_node->nid->value);
 
     $account = user_load($account->uid, TRUE);
 
@@ -174,20 +174,20 @@ function testExpiredLogs() {
       ->save();
     variable_set('statistics_day_timestamp', 8640000);
 
-    $this->drupalGet('node/' . $this->test_node->nid);
+    $this->drupalGet('node/' . $this->test_node->nid->value);
     // Manually calling statistics.php, simulating ajax behavior.
-    $nid = $this->test_node->nid;
+    $nid = $this->test_node->nid->value;
     $post = http_build_query(array('nid' => $nid));
     $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
     global $base_url;
     $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
     drupal_http_request($stats_path, array('method' => 'POST', 'data' => $post, 'headers' => $headers, 'timeout' => 10000));
-    $this->drupalGet('node/' . $this->test_node->nid);
+    $this->drupalGet('node/' . $this->test_node->nid->value);
     drupal_http_request($stats_path, array('method' => 'POST', 'data' => $post, 'headers' => $headers, 'timeout' => 10000));
     $this->assertText('1 view', 'Node is viewed once.');
 
     $this->drupalGet('admin/reports/pages');
-    $this->assertText('node/' . $this->test_node->nid, 'Hit URL found.');
+    $this->assertText('node/' . $this->test_node->nid->value, 'Hit URL found.');
 
     // statistics_cron() will subtract
     // statistics.settings:accesslog.max_lifetime config from REQUEST_TIME in
@@ -197,11 +197,11 @@ function testExpiredLogs() {
     $this->cronRun();
 
     $this->drupalGet('admin/reports/pages');
-    $this->assertNoText('node/' . $this->test_node->nid, 'No hit URL found.');
+    $this->assertNoText('node/' . $this->test_node->nid->value, 'No hit URL found.');
 
     $result = db_select('node_counter', 'nc')
       ->fields('nc', array('daycount'))
-      ->condition('nid', $this->test_node->nid, '=')
+      ->condition('nid', $this->test_node->nid->value, '=')
       ->execute()
       ->fetchField();
     $this->assertFalse($result, 'Daycounter is zero.');
diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php
index 7a6a79a..46927f3 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsLoggingTest.php
@@ -66,7 +66,7 @@ function setUp() {
    * Verifies request logging for cached and uncached pages.
    */
   function testLogging() {
-    $path = 'node/' . $this->node->nid;
+    $path = 'node/' . $this->node->nid->value;
     $expected = array(
       'title' => $this->node->label(),
       'path' => $path,
@@ -75,7 +75,7 @@ function testLogging() {
     // Verify logging of an uncached page.
     $this->drupalGet($path);
     // Manually calling statistics.php, simulating ajax behavior.
-    $nid = $this->node->nid;
+    $nid = $this->node->nid->value;
     $post = http_build_query(array('nid' => $nid));
     $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
     global $base_url;
@@ -85,7 +85,7 @@ function testLogging() {
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
     $this->assertTrue(is_array($log) && count($log) == 1, 'Page request was logged.');
     $this->assertEqual(array_intersect_key($log[0], $expected), $expected);
-    $node_counter = statistics_get($this->node->nid);
+    $node_counter = statistics_get($this->node->nid->value);
     $this->assertIdentical($node_counter['totalcount'], '1');
 
     // Verify logging of a cached page.
@@ -96,7 +96,7 @@ function testLogging() {
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
     $this->assertTrue(is_array($log) && count($log) == 2, 'Page request was logged.');
     $this->assertEqual(array_intersect_key($log[1], $expected), $expected);
-    $node_counter = statistics_get($this->node->nid);
+    $node_counter = statistics_get($this->node->nid->value);
     $this->assertIdentical($node_counter['totalcount'], '2');
 
     // Test logging from authenticated users
@@ -108,11 +108,11 @@ function testLogging() {
     // Check the 6th item since login and account pages are also logged
     $this->assertTrue(is_array($log) && count($log) == 6, 'Page request was logged.');
     $this->assertEqual(array_intersect_key($log[5], $expected), $expected);
-    $node_counter = statistics_get($this->node->nid);
+    $node_counter = statistics_get($this->node->nid->value);
     $this->assertIdentical($node_counter['totalcount'], '3');
 
     // Visit edit page to generate a title greater than 255.
-    $path = 'node/' . $this->node->nid . '/edit';
+    $path = 'node/' . $this->node->nid->value . '/edit';
     $expected = array(
       'title' => truncate_utf8(t('Edit Basic page') . ' ' . $this->node->label(), 255),
       'path' => $path,
diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php
index 80e6c38..f72bdf3 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php
@@ -72,9 +72,9 @@ function testAccessLogging() {
   function testPopularContentBlock() {
     // Visit a node to have something show up in the block.
     $node = $this->drupalCreateNode(array('type' => 'page', 'uid' => $this->blocking_user->uid));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     // Manually calling statistics.php, simulating ajax behavior.
-    $nid = $node->nid;
+    $nid = $node->nid->value;
     $post = http_build_query(array('nid' => $nid));
     $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
     global $base_url;
@@ -100,6 +100,6 @@ function testPopularContentBlock() {
     $this->assertText('All time', 'Found the all time popular content.');
     $this->assertText('Last viewed', 'Found the last viewed popular content.');
 
-    $this->assertRaw(l($node->label(), 'node/' . $node->nid), 'Found link to visited node.');
+    $this->assertRaw(l($node->label(), 'node/' . $node->nid->value), 'Found link to visited node.');
   }
 }
diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php
index 0b5909d..e960bce 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsTokenReplaceTest.php
@@ -31,15 +31,15 @@ function testStatisticsTokenReplacement() {
     $node = $this->drupalCreateNode(array('type' => 'page', 'uid' => $user->uid));
 
     // Hit the node.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     // Manually calling statistics.php, simulating ajax behavior.
-    $nid = $node->nid;
+    $nid = $node->nid->value;
     $post = http_build_query(array('nid' => $nid));
     $headers = array('Content-Type' => 'application/x-www-form-urlencoded');
     global $base_url;
     $stats_path = $base_url . '/' . drupal_get_path('module', 'statistics'). '/statistics.php';
     drupal_http_request($stats_path, array('method' => 'POST', 'data' => $post, 'headers' => $headers, 'timeout' => 10000));
-    $statistics = statistics_get($node->nid);
+    $statistics = statistics_get($node->nid->value);
 
     // Generate and test tokens.
     $tests = array();
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index 8469e52..45534bf 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -102,9 +102,9 @@ function statistics_permission() {
  * Implements hook_node_view().
  */
 function statistics_node_view(Node $node, $view_mode) {
-  if (!empty($node->nid) && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
+  if (!empty($node->nid->value) && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
     $node->content['#attached']['library'][] = array('statistics', 'drupal.statistics');
-    $settings = array('data' => array('nid' => $node->nid), 'url' => url(drupal_get_path('module', 'statistics') . '/statistics.php'));
+    $settings = array('data' => array('nid' => $node->nid->value), 'url' => url(drupal_get_path('module', 'statistics') . '/statistics.php'));
     $node->content['#attached']['js'][] = array(
       'data' => array('statistics' => $settings),
       'type' => 'setting',
@@ -113,7 +113,7 @@ function statistics_node_view(Node $node, $view_mode) {
 
   if ($view_mode != 'rss') {
     if (user_access('view post access counter')) {
-      $statistics = statistics_get($node->nid);
+      $statistics = statistics_get($node->nid->value);
       if ($statistics) {
         $links['statistics_counter']['title'] = format_plural($statistics['totalcount'], '1 view', '@count views');
         $node->content['links']['statistics'] = array(
@@ -417,7 +417,7 @@ function _statistics_format_item($title, $path) {
 function statistics_node_predelete(Node $node) {
   // clean up statistics table when node is deleted
   db_delete('node_counter')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
diff --git a/core/modules/statistics/statistics.pages.inc b/core/modules/statistics/statistics.pages.inc
index d4ac0f8..538fe31 100644
--- a/core/modules/statistics/statistics.pages.inc
+++ b/core/modules/statistics/statistics.pages.inc
@@ -33,8 +33,8 @@ function statistics_node_tracker() {
       ->fields('a', array('aid', 'timestamp', 'url', 'uid'))
       ->fields('u', array('name'))
       ->condition(db_or()
-        ->condition('a.path', 'node/' . $node->nid)
-        ->condition('a.path', 'node/' . $node->nid . '/%', 'LIKE'))
+        ->condition('a.path', 'node/' . $node->nid->value)
+        ->condition('a.path', 'node/' . $node->nid->value . '/%', 'LIKE'))
       ->limit(30)
       ->orderByHeader($header);
 
@@ -50,7 +50,7 @@ function statistics_node_tracker() {
     }
 
     // Do not use $node->label() here, because $node comes from the database.
-    drupal_set_title($node->title);
+    drupal_set_title($node->title->value);
     $build['statistics_table'] = array(
       '#theme' => 'table',
       '#header' => $header,
diff --git a/core/modules/statistics/statistics.tokens.inc b/core/modules/statistics/statistics.tokens.inc
index c2c8fc3..d8ea646 100644
--- a/core/modules/statistics/statistics.tokens.inc
+++ b/core/modules/statistics/statistics.tokens.inc
@@ -40,21 +40,21 @@ function statistics_tokens($type, $tokens, array $data = array(), array $options
 
     foreach ($tokens as $name => $original) {
       if ($name == 'total-count') {
-        $statistics = statistics_get($node->nid);
+        $statistics = statistics_get($node->nid->value);
         $replacements[$original] = $statistics['totalcount'];
       }
       elseif ($name == 'day-count') {
-        $statistics = statistics_get($node->nid);
+        $statistics = statistics_get($node->nid->value);
         $replacements[$original] = $statistics['daycount'];
       }
       elseif ($name == 'last-view') {
-        $statistics = statistics_get($node->nid);
+        $statistics = statistics_get($node->nid->value);
         $replacements[$original] = format_date($statistics['timestamp']);
       }
     }
 
     if ($created_tokens = token_find_with_prefix($tokens, 'last-view')) {
-      $statistics = statistics_get($node->nid);
+      $statistics = statistics_get($node->nid->value);
       $replacements += token_generate('date', $created_tokens, array('date' => $statistics['timestamp']), $options);
     }
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
index 0268756..c6af6af 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
@@ -167,7 +167,7 @@ function testRenderInlineFullPage() {
     $node = $this->drupalCreateNode($settings);
 
     // Fetch the page.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertRaw($expected, 'Inline stylesheets appear in the full page rendering.');
   }
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php
index 4afb574..a228fdb 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php
@@ -82,7 +82,7 @@ public function testCommentHooks() {
       'changed' => REQUEST_TIME,
     ));
     $node->save();
-    $nid = $node->nid;
+    $nid = $node->nid->value;
 
     $comment = entity_create('comment', array(
       'cid' => NULL,
@@ -219,7 +219,7 @@ public function testNodeHooks() {
     ));
 
     $_SESSION['entity_crud_hook_test'] = array();
-    $node = node_load($node->nid);
+    $node = node_load($node->nid->value);
 
     $this->assertHookMessageOrder(array(
       'entity_crud_hook_test_entity_load called for type node',
@@ -238,7 +238,7 @@ public function testNodeHooks() {
     ));
 
     $_SESSION['entity_crud_hook_test'] = array();
-    node_delete($node->nid);
+    node_delete($node->nid->value);
 
     $this->assertHookMessageOrder(array(
       'entity_crud_hook_test_node_predelete called',
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php
index de68e52..a5f14ae 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php
@@ -71,12 +71,12 @@ function testEntityFormLanguage() {
     $this->drupalPost(NULL, $edit, t('Save'));
 
     $node = $this->drupalGetNodeByTitle($edit["title"]);
-    $this->assertTrue($node->langcode == $form_langcode, 'Form language is the same as the entity language.');
+    $this->assertTrue($node->langcode->value == $form_langcode, 'Form language is the same as the entity language.');
 
     // Edit the node and test the form language.
-    $this->drupalGet($this->langcodes[0] . '/node/' . $node->nid . '/edit');
+    $this->drupalGet($this->langcodes[0] . '/node/' . $node->nid->value . '/edit');
     $form_langcode = variable_get('entity_form_langcode', FALSE);
-    $this->assertTrue($node->langcode == $form_langcode, 'Form language is the same as the entity language.');
+    $this->assertTrue($node->langcode->value == $form_langcode, 'Form language is the same as the entity language.');
 
     // Explicitly set form langcode.
     $langcode = $this->langcodes[0];
@@ -115,7 +115,7 @@ function testEntityFormLanguage() {
     $langcode2 = $this->langcodes[1];
     $node->body[$langcode2][0]['value'] = $this->randomName(16);
     $node->save();
-    $this->drupalGet($langcode2 . '/node/' . $node->nid . '/edit');
+    $this->drupalGet($langcode2 . '/node/' . $node->nid->value . '/edit');
     $form_langcode = variable_get('entity_form_langcode', FALSE);
     $this->assertTrue($langcode2 == $form_langcode, "Node edit form language is $langcode2.");
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php
index 2054180..962b0a6 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLanguageTest.php
@@ -79,11 +79,11 @@ function testLocalizeDateFormats() {
     $node = $this->drupalCreateNode(array('type' => 'article'));
 
     // Configure format for the node posted date changes with the language.
-    $this->drupalGet('node/' . $node->nid);
-    $english_date = format_date($node->created, 'custom', 'j M Y');
+    $this->drupalGet('node/' . $node->nid->value);
+    $english_date = format_date($node->created->value->getTimestamp(), 'custom', 'j M Y');
     $this->assertText($english_date, t('English date format appears'));
-    $this->drupalGet('fr/node/' . $node->nid);
-    $french_date = format_date($node->created, 'custom', 'd.m.Y');
+    $this->drupalGet('fr/node/' . $node->nid->value);
+    $french_date = format_date($node->created->value->getTimestamp(), 'custom', 'd.m.Y');
     $this->assertText($french_date, t('French date format appears'));
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/PageTitleFilteringTest.php b/core/modules/system/lib/Drupal/system/Tests/System/PageTitleFilteringTest.php
index c0d00c3..408e873 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/PageTitleFilteringTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/PageTitleFilteringTest.php
@@ -79,7 +79,7 @@ function testTitleTags() {
 
     $node = $this->drupalGetNodeByTitle($edit["title"]);
     $this->assertNotNull($node, 'Node created and found in database');
-    $this->drupalGet("node/" . $node->nid);
+    $this->drupalGet("node/" . $node->nid->value);
     $this->assertText(check_plain($edit["title"]), 'Check to make sure tags in the node title are converted.');
   }
   /**
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
index 3d0188d..0f3bf4c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
@@ -184,13 +184,13 @@ function testAdministrationTheme() {
     $this->drupalGet('admin/config');
     $this->assertRaw('core/themes/seven', t('Administration theme used on an administration page.'));
 
-    $this->drupalGet('node/' . $this->node->nid);
+    $this->drupalGet('node/' . $this->node->nid->value);
     $this->assertRaw('core/themes/stark', t('Site default theme used on node page.'));
 
     $this->drupalGet('node/add');
     $this->assertRaw('core/themes/seven', t('Administration theme used on the add content page.'));
 
-    $this->drupalGet('node/' . $this->node->nid . '/edit');
+    $this->drupalGet('node/' . $this->node->nid->value . '/edit');
     $this->assertRaw('core/themes/seven', t('Administration theme used on the edit content page.'));
 
     // Disable the admin theme on the node admin pages.
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
index 79bea6b..df25dcf 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
@@ -40,9 +40,9 @@ function testTokenReplacement() {
     $source .= '[user:name]';          // No user passed in, should be untouched
     $source .= '[bogus:token]';        // Non-existent token
 
-    $target  = check_plain($node->title);
+    $target  = check_plain($node->title->value);
     $target .= check_plain($account->name);
-    $target .= format_interval(REQUEST_TIME - $node->created, 2, $language_interface->langcode);
+    $target .= format_interval(REQUEST_TIME - $node->created->value->getTimestamp(), 2, $language_interface->langcode);
     $target .= check_plain($user->name);
     $target .= format_date(REQUEST_TIME, 'short', '', NULL, $language_interface->langcode);
 
@@ -62,10 +62,10 @@ function testTokenReplacement() {
     // token, [node:title].
     $raw_tokens = array('title' => '[node:title]');
     $generated = token_generate('node', $raw_tokens, array('node' => $node));
-    $this->assertEqual($generated['[node:title]'], check_plain($node->title), t('Token sanitized.'));
+    $this->assertEqual($generated['[node:title]'], check_plain($node->title->value), t('Token sanitized.'));
 
     $generated = token_generate('node', $raw_tokens, array('node' => $node), array('sanitize' => FALSE));
-    $this->assertEqual($generated['[node:title]'], $node->title, t('Unsanitized token generated properly.'));
+    $this->assertEqual($generated['[node:title]'], $node->title->value, t('Unsanitized token generated properly.'));
 
     // Test token replacement when the string contains no tokens.
     $this->assertEqual(token_replace('No tokens here.'), 'No tokens here.');
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index dd263cd..6d8e694 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -2105,10 +2105,10 @@ function hook_mail($key, &$message, $params) {
   if (isset($params['node'])) {
     $node = $params['node'];
     $variables += array(
-      '%uid' => $node->uid,
-      '%node_url' => url('node/' . $node->nid, array('absolute' => TRUE)),
+      '%uid' => $node->uid->value,
+      '%node_url' => url('node/' . $node->nid->value, array('absolute' => TRUE)),
       '%node_type' => node_get_type_label($node),
-      '%title' => $node->title,
+      '%title' => $node->title->value,
       '%teaser' => $node->teaser,
       '%body' => $node->body,
     );
@@ -3589,36 +3589,36 @@ function hook_tokens($type, $tokens, array $data = array(), array $options = arr
       switch ($name) {
         // Simple key values on the node.
         case 'nid':
-          $replacements[$original] = $node->nid;
+          $replacements[$original] = $node->nid->value;
           break;
 
         case 'title':
-          $replacements[$original] = $sanitize ? check_plain($node->title) : $node->title;
+          $replacements[$original] = $sanitize ? check_plain($node->title->value) : $node->title->value;
           break;
 
         case 'edit-url':
-          $replacements[$original] = url('node/' . $node->nid . '/edit', $url_options);
+          $replacements[$original] = url('node/' . $node->nid->value . '/edit', $url_options);
           break;
 
         // Default values for the chained tokens handled below.
         case 'author':
-          $name = ($node->uid == 0) ? config('user.settings')->get('anonymous') : $node->name;
+          $name = ($node->uid->value == 0) ? config('user.settings')->get('anonymous') : $node->name;
           $replacements[$original] = $sanitize ? filter_xss($name) : $name;
           break;
 
         case 'created':
-          $replacements[$original] = format_date($node->created, 'medium', '', NULL, $langcode);
+          $replacements[$original] = format_date($node->created->value->getTimestamp(), 'medium', '', NULL, $langcode);
           break;
       }
     }
 
     if ($author_tokens = token_find_with_prefix($tokens, 'author')) {
-      $author = user_load($node->uid);
+      $author = $node->uid->entity;
       $replacements += token_generate('user', $author_tokens, array('user' => $author), $options);
     }
 
     if ($created_tokens = token_find_with_prefix($tokens, 'created')) {
-      $replacements += token_generate('date', $created_tokens, array('date' => $node->created), $options);
+      $replacements += token_generate('date', $created_tokens, array('date' => $node->created->value->getTimestamp()), $options);
     }
   }
 
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
index d00f373..71b3be7 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/LegacyTest.php
@@ -42,6 +42,6 @@ function testTaxonomyLegacyNode() {
     $this->drupalPost('node/add/article', $edit, t('Save'));
     // Checks that the node has been saved.
     $node = $this->drupalGetNodeByTitle($edit['title']);
-    $this->assertEqual($node->created, strtotime($edit['date']), 'Legacy node was saved with the right date.');
+    $this->assertEqual($node->created->value->getTimestamp(), strtotime($edit['date']), 'Legacy node was saved with the right date.');
   }
 }
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php
index 31d01c5..283f31b 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php
@@ -111,39 +111,39 @@ function testTaxonomyIndex() {
     // Check that the term is indexed, and only once.
     $node = $this->drupalGetNodeByTitle($edit["title"]);
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_1->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 1 is indexed once.');
 
     // Update the article to change one term.
     $edit["{$this->field_name_1}[$langcode][]"] = $term_2->tid;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
     // Check that both terms are indexed.
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_1->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 1 is indexed.');
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_2->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 2 is indexed.');
 
     // Update the article to change another term.
     $edit["{$this->field_name_2}[$langcode][]"] = $term_2->tid;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
     // Check that only one term is indexed.
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_1->tid,
     ))->fetchField();
     $this->assertEqual(0, $index_count, 'Term 1 is not indexed.');
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_2->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 2 is indexed once.');
@@ -158,12 +158,12 @@ function testTaxonomyIndex() {
 
     // Check that the index was not changed.
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_1->tid,
     ))->fetchField();
     $this->assertEqual(0, $index_count, 'Term 1 is not indexed.');
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_2->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 2 is indexed once.');
@@ -174,12 +174,12 @@ function testTaxonomyIndex() {
 
     // Check that both terms are indexed.
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_1->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 1 is indexed.');
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_2->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 2 is indexed.');
@@ -190,12 +190,12 @@ function testTaxonomyIndex() {
 
     // Check that only one term is indexed.
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_1->tid,
     ))->fetchField();
     $this->assertEqual(1, $index_count, 'Term 1 is indexed once.');
     $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
-      ':nid' => $node->nid,
+      ':nid' => $node->nid->value,
       ':tid' => $term_2->tid,
     ))->fetchField();
     $this->assertEqual(0, $index_count, 'Term 2 is not indexed.');
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php
index b2603d6..9972987 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php
@@ -114,7 +114,7 @@ function testTaxonomyNode() {
 
     // Check that the term is displayed when the node is viewed.
     $node = $this->drupalGetNodeByTitle($edit["title"]);
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($term1->name, 'Term is displayed when viewing the node.');
 
     $this->clickLink(t('Edit'));
@@ -124,13 +124,13 @@ function testTaxonomyNode() {
 
     // Edit the node with a different term.
     $edit[$this->instance['field_name'] . '[' . $langcode . '][]'] = $term2->tid;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertText($term2->name, 'Term is displayed when viewing the node.');
 
     // Preview the node.
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Preview'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Preview'));
     $this->assertNoUniqueText($term2->name, 'Term is displayed when previewing the node.');
     $this->drupalPost(NULL, NULL, t('Preview'));
     $this->assertNoUniqueText($term2->name, 'Term is displayed when previewing the node again.');
@@ -194,7 +194,7 @@ function testNodeTermCreationAndDeletion() {
 
     // Get the node.
     $node = $this->drupalGetNodeByTitle($edit["title"]);
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
 
     foreach ($term_names as $term_name) {
       $this->assertText($term_name, format_string('The term %name appears on the node page after two terms, %deleted1 and %deleted2, were deleted', array('%name' => $term_name, '%deleted1' => $term_objects['term1']->name, '%deleted2' => $term_objects['term2']->name)));
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php
index e273c1b..80b5530 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php
@@ -78,7 +78,7 @@ function testTaxonomyTokenReplacement() {
     $edit = array();
     $node = $this->drupalCreateNode(array('type' => 'article'));
     $edit[$this->instance['field_name'] . '[' . $this->langcode . '][]'] = $term2->tid;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
 
     // Generate and test sanitized tokens for term1.
     $tests = array();
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index faa04dd..9fd0e9f 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -1581,19 +1581,19 @@ function taxonomy_build_node_index($node) {
     // If a node property is not set in the node object when node_save() is
     // called, the old value from $node->original is used.
     if (!empty($node->original)) {
-      $status = (int)(!empty($node->status) || (!isset($node->status) && !empty($node->original->status)));
-      $sticky = (int)(!empty($node->sticky) || (!isset($node->sticky) && !empty($node->original->sticky)));
+      $status = (int)(!empty($node->status->value) || (!isset($node->status->value) && !empty($node->original->status)));
+      $sticky = (int)(!empty($node->sticky->value) || (!isset($node->sticky->value) && !empty($node->original->sticky)));
     }
     else {
-      $status = (int)(!empty($node->status));
-      $sticky = (int)(!empty($node->sticky));
+      $status = (int)(!empty($node->status->value));
+      $sticky = (int)(!empty($node->sticky->value));
     }
   }
   // We only maintain the taxonomy index for published nodes.
   if ($status && $node->isDefaultRevision()) {
     // Collect a unique list of all the term IDs from all node fields.
     $tid_all = array();
-    foreach (field_info_instances('node', $node->type) as $instance) {
+    foreach (field_info_instances('node', $node->type->value) as $instance) {
       $field_name = $instance['field_name'];
       $field = field_info_field($field_name);
       if ($field['module'] == 'taxonomy' && $field['storage']['type'] == 'field_sql_storage') {
@@ -1622,10 +1622,10 @@ function taxonomy_build_node_index($node) {
       $query = db_insert('taxonomy_index')->fields(array('nid', 'tid', 'sticky', 'created'));
       foreach ($tid_all as $tid) {
         $query->values(array(
-          'nid' => $node->nid,
+          'nid' => $node->nid->value,
           'tid' => $tid,
           'sticky' => $sticky,
-          'created' => $node->created,
+          'created' => $node->created->value->getTimestamp(),
         ));
       }
       $query->execute();
@@ -1658,7 +1658,7 @@ function taxonomy_node_predelete(Node $node) {
  */
 function taxonomy_delete_node_index(Node $node) {
   if (variable_get('taxonomy_maintain_index_table', TRUE)) {
-    db_delete('taxonomy_index')->condition('nid', $node->nid)->execute();
+    db_delete('taxonomy_index')->condition('nid', $node->nid->value)->execute();
   }
 }
 
diff --git a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerNodeAccessTest.php b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerNodeAccessTest.php
index 3a5efda..939627d 100644
--- a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerNodeAccessTest.php
+++ b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerNodeAccessTest.php
@@ -63,13 +63,13 @@ function testTrackerNodeAccess() {
 
     // User with access should see both nodes created.
     $this->drupalGet('tracker');
-    $this->assertText($private_node->title, 'Private node is visible to user with private access.');
-    $this->assertText($public_node->title, 'Public node is visible to user with private access.');
+    $this->assertText($private_node->title->value, 'Private node is visible to user with private access.');
+    $this->assertText($public_node->title->value, 'Public node is visible to user with private access.');
 
     // User without access should not see private node.
     $this->drupalLogin($no_access_user);
     $this->drupalGet('tracker');
-    $this->assertNoText($private_node->title, 'Private node is not visible to user without private access.');
-    $this->assertText($public_node->title, 'Public node is visible to user without private access.');
+    $this->assertNoText($private_node->title->value, 'Private node is not visible to user without private access.');
+    $this->assertText($public_node->title->value, 'Public node is visible to user without private access.');
   }
 }
diff --git a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
index 7cd99cc..9e6f69d 100644
--- a/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
+++ b/core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
@@ -143,7 +143,7 @@ function testTrackerNewNodes() {
     $this->drupalGet('tracker');
     $this->assertPattern('/' . $title . '.*new/', t('New nodes are flagged as such in the tracker listing.'));
 
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->drupalGet('tracker');
     $this->assertNoPattern('/' . $title . '.*new/', t('Visited nodes are not flagged as new.'));
 
@@ -151,7 +151,7 @@ function testTrackerNewNodes() {
     $this->drupalGet('tracker');
     $this->assertPattern('/' . $title . '.*new/', t('For another user, new nodes are flagged as such in the tracker listing.'));
 
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->drupalGet('tracker');
     $this->assertNoPattern('/' . $title . '.*new/', t('For another user, visited nodes are not flagged as new.'));
   }
@@ -173,12 +173,12 @@ function testTrackerNewComments() {
       'comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][value]' => $this->randomName(20),
     );
     // The new comment is automatically viewed by the current user.
-    $this->drupalPost('comment/reply/' . $node->nid, $comment, t('Save'));
+    $this->drupalPost('comment/reply/' . $node->nid->value, $comment, t('Save'));
 
     $this->drupalLogin($this->other_user);
     $this->drupalGet('tracker');
     $this->assertText('1 new', t('New comments are counted on the tracker listing pages.'));
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
 
     // Add another comment as other_user.
     $comment = array(
@@ -188,7 +188,7 @@ function testTrackerNewComments() {
     // If the comment is posted in the same second as the last one then Drupal
     // can't tell the difference, so we wait one second here.
     sleep(1);
-    $this->drupalPost('comment/reply/' . $node->nid, $comment, t('Save'));
+    $this->drupalPost('comment/reply/' . $node->nid->value, $comment, t('Save'));
 
     $this->drupalLogin($this->user);
     $this->drupalGet('tracker');
@@ -271,7 +271,7 @@ function testTrackerAdminUnpublish() {
     // Unpublish the node and ensure that it's no longer displayed.
     $edit = array(
       'operation' => 'unpublish',
-      'nodes[' . $node->nid . ']' => $node->nid,
+      'nodes[' . $node->nid->value . ']' => $node->nid->value,
     );
     $this->drupalPost('admin/content', $edit, t('Update'));
 
diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module
index 7060a87..12b7465 100644
--- a/core/modules/tracker/tracker.module
+++ b/core/modules/tracker/tracker.module
@@ -193,7 +193,7 @@ function _tracker_user_access($account) {
  * Adds new tracking information for this node since it's new.
  */
 function tracker_node_insert(Node $node, $arg = 0) {
-  _tracker_add($node->nid, $node->uid, $node->changed);
+  _tracker_add($node->nid->value, $node->uid->value, $node->changed->value->getTimestamp());
 }
 
 /**
@@ -202,7 +202,7 @@ function tracker_node_insert(Node $node, $arg = 0) {
  * Adds tracking information for this node since it's been updated.
  */
 function tracker_node_update(Node $node, $arg = 0) {
-  _tracker_add($node->nid, $node->uid, $node->changed);
+  _tracker_add($node->nid->value, $node->uid->value, $node->changed->value->getTimestamp());
 }
 
 /**
@@ -212,10 +212,10 @@ function tracker_node_update(Node $node, $arg = 0) {
  */
 function tracker_node_predelete(Node $node, $arg = 0) {
   db_delete('tracker_node')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
   db_delete('tracker_user')
-    ->condition('nid', $node->nid)
+    ->condition('nid', $node->nid->value)
     ->execute();
 }
 
@@ -272,14 +272,14 @@ function _tracker_add($nid, $uid, $changed) {
 
   // Adding a comment can only increase the changed timestamp, so our
   // calculation here is simple.
-  $changed = max($node->changed, $changed);
+  $changed = max($node->changed->value->getTimestamp(), $changed);
 
   // Update the node-level data.
   db_merge('tracker_node')
     ->key(array('nid' => $nid))
     ->fields(array(
       'changed' => $changed,
-      'published' => $node->status,
+      'published' => $node->status->value,
     ))
     ->execute();
 
@@ -291,7 +291,7 @@ function _tracker_add($nid, $uid, $changed) {
     ))
     ->fields(array(
       'changed' => $changed,
-      'published' => $node->status,
+      'published' => $node->status->value,
     ))
     ->execute();
 }
@@ -338,7 +338,7 @@ function _tracker_remove($nid, $uid = NULL, $changed = NULL) {
 
   if ($node) {
     // Self-authorship is one reason to keep the user's subscription.
-    $keep_subscription = ($node->uid == $uid);
+    $keep_subscription = ($node->uid->value == $uid);
 
     // Comments are a second reason to keep the user's subscription.
     if (!$keep_subscription) {
@@ -363,7 +363,7 @@ function _tracker_remove($nid, $uid = NULL, $changed = NULL) {
     // We only need to do this if the removed item has a timestamp that equals
     // or exceeds the listed changed timestamp for the node.
     $tracker_node = db_query('SELECT nid, changed FROM {tracker_node} WHERE nid = :nid', array(':nid' => $nid))->fetchObject();
-    if ($tracker_node && $changed >= $tracker_node->changed) {
+    if ($tracker_node && $changed >= $tracker_node->changed->value->getTimestamp()) {
       // If we're here, the item being removed is *possibly* the item that
       // established the node's changed timestamp.
 
@@ -375,14 +375,14 @@ function _tracker_remove($nid, $uid = NULL, $changed = NULL) {
       db_update('tracker_node')
         ->fields(array(
           'changed' => $changed,
-          'published' => $node->status,
+          'published' => $node->status->value,
         ))
         ->condition('nid', $nid)
         ->execute();
       db_update('tracker_node')
         ->fields(array(
           'changed' => $changed,
-          'published' => $node->status,
+          'published' => $node->status->value,
         ))
         ->condition('nid', $nid)
         ->execute();
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index 853f50d..e1e1801 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -52,8 +52,8 @@ function tracker_page($account = NULL, $set_title = FALSE) {
     // Now, get the data and put into the placeholder array.
     $result = db_query('SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid WHERE n.nid IN (:nids)', array(':nids' => array_keys($nodes)), array('target' => 'slave'));
     foreach ($result as $node) {
-      $node->last_activity = $nodes[$node->nid]->changed;
-      $nodes[$node->nid] = $node;
+      $node->last_activity = $nodes[$node->nid->value]->changed;
+      $nodes[$node->nid->value] = $node;
     }
 
     // Display the data.
@@ -63,17 +63,17 @@ function tracker_page($account = NULL, $set_title = FALSE) {
       if ($node->comment_count) {
         $comments = $node->comment_count;
 
-        if ($new = comment_num_new($node->nid)) {
+        if ($new = comment_num_new($node->nid->value)) {
           $comments .= '<br />';
-          $comments .= l(format_plural($new, '1 new', '@count new'), 'node/' . $node->nid, array('fragment' => 'new'));
+          $comments .= l(format_plural($new, '1 new', '@count new'), 'node/' . $node->nid->value, array('fragment' => 'new'));
         }
       }
 
       $row = array(
         'type' => check_plain(node_get_type_label($node)),
         // Do not use $node->label(), because $node comes from the database.
-        'title' => array('data' => l($node->title, 'node/' . $node->nid) . ' ' . theme('mark', array('type' => node_mark($node->nid, $node->changed)))),
-        'author' => array('data' => theme('username', array('account' => $node))),
+        'title' => array('data' => l($node->title->value, 'node/' . $node->nid->value) . ' ' . theme('mark', array('type' => node_mark($node->nid->value, $node->changed->value->getTimestamp())))),
+        'author' => array('data' => theme('username', array('account' => $node->uid->entity))),
         'replies' => array('class' => array('replies'), 'data' => $comments),
         'last updated' => array('data' => t('!time ago', array('!time' => format_interval(REQUEST_TIME - $node->last_activity)))),
       );
@@ -82,7 +82,7 @@ function tracker_page($account = NULL, $set_title = FALSE) {
       if (function_exists('rdf_mapping_load')) {
         // Each node is not loaded for performance reasons, as a result we need
         // to retrieve the RDF mapping for each node type.
-        $mapping = rdf_mapping_load('node', $node->type);
+        $mapping = rdf_mapping_load('node', $node->type->value);
         // Adds RDFa markup to the title of the node. Because the RDFa markup is
         // added to the td tag which might contain HTML code, we specify an
         // empty datatype to ensure the value of the title read by the RDFa
@@ -112,7 +112,7 @@ function tracker_page($account = NULL, $set_title = FALSE) {
         // node the RDFa annotations above apply to. We move the content of
         // $row to a 'data' sub array so we can specify attributes for the row.
         $row = array('data' => $row);
-        $row['about'] = url('node/' . $node->nid);
+        $row['about'] = url('node/' . $node->nid->value);
       }
       $rows[] = $row;
     }
diff --git a/core/modules/translation/lib/Drupal/translation/Tests/TranslationTest.php b/core/modules/translation/lib/Drupal/translation/Tests/TranslationTest.php
index a9fae77..1624e06 100644
--- a/core/modules/translation/lib/Drupal/translation/Tests/TranslationTest.php
+++ b/core/modules/translation/lib/Drupal/translation/Tests/TranslationTest.php
@@ -77,16 +77,16 @@ function testContentTranslation() {
     // Unpublish the original node to check that this has no impact on the
     // translation overview page, publish it again afterwards.
     $this->drupalLogin($this->admin_user);
-    $this->drupalPost('node/' . $node->nid . '/edit', array('status' => FALSE), t('Save'));
-    $this->drupalGet('node/' . $node->nid . '/translate');
-    $this->drupalPost('node/' . $node->nid . '/edit', array('status' => NODE_PUBLISHED), t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', array('status' => FALSE), t('Save'));
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
+    $this->drupalPost('node/' . $node->nid->value . '/edit', array('status' => NODE_PUBLISHED), t('Save'));
     $this->drupalLogin($this->translator);
 
     // Check that the "add translation" link uses a localized path.
     $languages = language_list();
     $prefixes = language_negotiation_url_prefixes();
-    $this->drupalGet('node/' . $node->nid . '/translate');
-    $this->assertLinkByHref($prefixes['es'] . '/node/add/' . $node->type, 0, t('The "add translation" link for %language points to the localized path of the target language.', array('%language' => $languages['es']->name)));
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
+    $this->assertLinkByHref($prefixes['es'] . '/node/add/' . $node->type->value, 0, t('The "add translation" link for %language points to the localized path of the target language.', array('%language' => $languages['es']->name)));
 
     // Submit translation in Spanish.
     $node_translation_title = $this->randomName();
@@ -95,13 +95,13 @@ function testContentTranslation() {
 
     // Check that the "edit translation" and "view node" links use localized
     // paths.
-    $this->drupalGet('node/' . $node->nid . '/translate');
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
     $this->assertLinkByHref($prefixes['es'] . '/node/' . $node_translation->nid . '/edit', 0, t('The "edit" link for the translation in %language points to the localized path of the translation language.', array('%language' => $languages['es']->name)));
     $this->assertLinkByHref($prefixes['es'] . '/node/' . $node_translation->nid, 0, t('The "view" link for the translation in %language points to the localized path of the translation language.', array('%language' => $languages['es']->name)));
 
     // Attempt to submit a duplicate translation by visiting the node/add page
     // with identical query string.
-    $this->drupalGet('node/add/page', array('query' => array('translation' => $node->nid, 'target' => 'es')));
+    $this->drupalGet('node/add/page', array('query' => array('translation' => $node->nid->value, 'target' => 'es')));
     $this->assertRaw(t('A translation of %title in %language already exists', array('%title' => $node_title, '%language' => $languages['es']->name)), t('Message regarding attempted duplicate translation is displayed.'));
 
     // Attempt a resubmission of the form - this emulates using the back button
@@ -110,7 +110,7 @@ function testContentTranslation() {
     $langcode = LANGUAGE_NOT_SPECIFIED;
     $edit["title"] = $this->randomName();
     $edit["body[$langcode][0][value]"] = $this->randomName();
-    $this->drupalPost('node/add/page', $edit, t('Save'), array('query' => array('translation' => $node->nid, 'language' => 'es')));
+    $this->drupalPost('node/add/page', $edit, t('Save'), array('query' => array('translation' => $node->nid->value, 'language' => 'es')));
     $duplicate = $this->drupalGetNodeByTitle($edit["title"]);
     $this->assertEqual($duplicate->tnid, 0, t('The node does not have a tnid.'));
 
@@ -120,11 +120,11 @@ function testContentTranslation() {
     $edit = array();
     $edit["body[$langcode][0][value]"] = $node_body;
     $edit['translation[retranslate]'] = TRUE;
-    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->drupalPost('node/' . $node->nid->value . '/edit', $edit, t('Save'));
     $this->assertRaw(t('Basic page %title has been updated.', array('%title' => $node_title)), t('Original node updated.'));
 
     // Check to make sure that interface shows translation as outdated.
-    $this->drupalGet('node/' . $node->nid . '/translate');
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
     $this->assertRaw('<span class="marker">' . t('outdated') . '</span>', t('Translation marked as outdated.'));
 
     // Update translation and mark as updated.
@@ -146,7 +146,7 @@ function testContentTranslation() {
     $this->drupalLogin($this->admin_user);
     $this->drupalPost('admin/config/regional/language/delete/es', array(), t('Delete'));
     $this->drupalLogin($this->translator);
-    $this->drupalGet('node/' . $node->nid . '/translate');
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
     $this->assertRaw(t('Translations of %title', array('%title' => $node->label())), t('Translation overview page available with only one language enabled.'));
   }
 
@@ -243,8 +243,8 @@ function testLanguageSwitcherBlockIntegration() {
     // Check that new nodes with a language assigned do not trigger language
     // switcher alterations when translation support is disabled.
     $node = $this->createPage($this->randomName(), $this->randomName());
-    $node_es = (object) array('nid' => $node->nid, 'langcode' => 'es');
-    $node_it = (object) array('nid' => $node->nid, 'langcode' => 'it');
+    $node_es = (object) array('nid' => $node->nid->value, 'langcode' => 'es');
+    $node_it = (object) array('nid' => $node->nid->value, 'langcode' => 'it');
     $this->assertLanguageSwitchLinks($node, $node, TRUE, $type);
     $this->assertLanguageSwitchLinks($node, $node_es, TRUE, $type);
     $this->assertLanguageSwitchLinks($node, $node_it, TRUE, $type);
@@ -258,8 +258,8 @@ function testTranslateOwnContentRole() {
     // that has "translate own content" role.
     $this->drupalLogin($this->limited_translator);
     $node = $this->createPage($this->randomName(), $this->randomName(), 'en');
-    $this->assertLinkByHref('node/' . $node->nid . '/translate', 0, t('User with "translate own content" role can see translate link'));
-    $this->drupalGet('node/' . $node->nid . '/translate');
+    $this->assertLinkByHref('node/' . $node->nid->value . '/translate', 0, t('User with "translate own content" role can see translate link'));
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
     $this->assertResponse(200, t('User with "translate own content" role can get translate page'));
     $translation_es = $this->createTranslation($node, $this->randomName(), $this->randomName(), 'es');
 
@@ -268,14 +268,14 @@ function testTranslateOwnContentRole() {
     $node = $this->createPage($this->randomName(), $this->randomName(), 'en');
     // Change to limited_translator and check that translate links aren't shown.
     $this->drupalLogin($this->limited_translator);
-    $this->assertNoLinkByHref('node/' . $node->nid . '/translate', t('User with "translate own content" role can\'t see translate link'));
+    $this->assertNoLinkByHref('node/' . $node->nid->value . '/translate', t('User with "translate own content" role can\'t see translate link'));
     // Check if user with "translate own content" role can see translate page
     // from other user's node.
-    $this->drupalGet('node/' . $node->nid . '/translate');
+    $this->drupalGet('node/' . $node->nid->value . '/translate');
     $this->assertResponse(403, t('User with "translate own content" role can\'t get translate page'));
 
     // Try to change to translate with "brute force".
-    $this->drupalGet('node/add/page', array('query' => array('translation' => $node->nid, 'target' => 'es')));
+    $this->drupalGet('node/add/page', array('query' => array('translation' => $node->nid->value, 'target' => 'es')));
     $this->assertResponse(403, t('User with "translate own content" role can\'t get create translate page'));
   }
 
@@ -379,7 +379,7 @@ function createPage($title, $body, $langcode = NULL) {
    *   Translation object.
    */
   function createTranslation(Node $node, $title, $body, $langcode) {
-    $this->drupalGet('node/add/page', array('query' => array('translation' => $node->nid, 'target' => $langcode)));
+    $this->drupalGet('node/add/page', array('query' => array('translation' => $node->nid->value, 'target' => $langcode)));
 
     $field_langcode = LANGUAGE_NOT_SPECIFIED;
     $body_key = "body[$field_langcode][0][value]";
@@ -395,7 +395,7 @@ function createTranslation(Node $node, $title, $body, $langcode) {
     // Check to make sure that translation was successful.
     $translation = $this->drupalGetNodeByTitle($title);
     $this->assertTrue($translation, t('Node found in database.'));
-    $this->assertTrue($translation->tnid == $node->nid, t('Translation set id correctly stored.'));
+    $this->assertTrue($translation->tnid == $node->nid->value, t('Translation set id correctly stored.'));
 
     return $translation;
   }
@@ -449,11 +449,11 @@ function assertLanguageSwitchLinks($node, $translation, $find = TRUE, $types = N
 
     $result = TRUE;
     $languages = language_list();
-    $page_language = $languages[$node->langcode];
+    $page_language = $languages[$node->langcode->value];
     $translation_language = $languages[$translation->langcode];
     $url = url("node/$translation->nid", array('language' => $translation_language));
 
-    $this->drupalGet("node/$node->nid", array('language' => $page_language));
+    $this->drupalGet('node/' . $node->nid->value, array('language' => $page_language));
 
     foreach ($types as $type) {
       $args = array('%translation_language' => $translation_language->name, '%page_language' => $page_language->name, '%type' => $type);
diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module
index bf1e528..764fa89 100644
--- a/core/modules/translation/translation.module
+++ b/core/modules/translation/translation.module
@@ -83,7 +83,7 @@ function translation_menu() {
  * @see translation_menu()
  */
 function _translation_tab_access($node) {
-  if ($node->langcode != LANGUAGE_NOT_SPECIFIED && translation_supported_type($node->type) && node_access('view', $node)) {
+  if ($node->langcode->value != LANGUAGE_NOT_SPECIFIED && translation_supported_type($node->type->value) && node_access('view', $node)) {
     return translation_user_can_translate_node($node);
   }
   return FALSE;
@@ -146,7 +146,7 @@ function translation_user_can_translate_node($node, $account = NULL) {
   if (empty($account)) {
     $account = $GLOBALS['user'];
   }
-  return node_access('view', $node, $account) && (user_access('translate all content', $account) || ($node->uid == $account->uid && user_access('translate own content', $account)));
+  return node_access('view', $node, $account) && (user_access('translate all content', $account) || ($node->uid->value == $account->uid && user_access('translate own content', $account)));
 }
 
 /**
@@ -191,34 +191,34 @@ function translation_node_type_language_translation_enabled_validate($element, &
  */
 function translation_form_node_form_alter(&$form, &$form_state) {
   $node = $form_state['controller']->getEntity($form_state);
-  if (translation_supported_type($node->type)) {
+  if (translation_supported_type($node->type->value)) {
     if (!empty($node->translation_source)) {
       // We are creating a translation. Add values and lock language field.
       $form['translation_source'] = array('#type' => 'value', '#value' => $node->translation_source);
       $form['langcode']['#disabled'] = TRUE;
     }
-    elseif (!empty($node->nid) && !empty($node->tnid)) {
+    elseif (!empty($node->nid->value) && !empty($node->tnid->value)) {
       // Disable languages for existing translations, so it is not possible
       // to switch this node to some language which is already in the
       // translation set. Also remove the language neutral option.
       unset($form['langcode']['#options'][LANGUAGE_NOT_SPECIFIED]);
-      foreach (translation_node_get_translations($node->tnid) as $langcode => $translation) {
-        if ($translation->nid != $node->nid) {
+      foreach (translation_node_get_translations($node->tnid->value) as $langcode => $translation) {
+        if ($translation->nid != $node->nid->value) {
           unset($form['langcode']['#options'][$langcode]);
         }
       }
       // Add translation values and workflow options.
-      $form['tnid'] = array('#type' => 'value', '#value' => $node->tnid);
+      $form['tnid'] = array('#type' => 'value', '#value' => $node->tnid->value);
       $form['translation'] = array(
         '#type' => 'fieldset',
         '#title' => t('Translation settings'),
         '#access' => translation_user_can_translate_node($node),
         '#collapsible' => TRUE,
-        '#collapsed' => !$node->translate,
+        '#collapsed' => !$node->translate->value,
         '#tree' => TRUE,
         '#weight' => 30,
       );
-      if ($node->tnid == $node->nid) {
+      if ($node->tnid->value == $node->nid->value) {
         // This is the source node of the translation.
         $form['translation']['retranslate'] = array(
           '#type' => 'checkbox',
@@ -232,7 +232,7 @@ function translation_form_node_form_alter(&$form, &$form_state) {
         $form['translation']['status'] = array(
           '#type' => 'checkbox',
           '#title' => t('This translation needs to be updated'),
-          '#default_value' => $node->translate,
+          '#default_value' => $node->translate->value,
           '#description' => t('When this option is checked, this translation needs to be updated because the source post has changed. Uncheck when the translation is up to date again.'),
         );
       }
@@ -250,7 +250,7 @@ function translation_form_node_form_alter(&$form, &$form_state) {
 function translation_node_view(Node $node, $view_mode) {
   // If the site has no translations or is not multilingual we have no content
   // translation links to display.
-  if (isset($node->tnid) && language_multilingual() && $translations = translation_node_get_translations($node->tnid)) {
+  if (isset($node->tnid->value) && language_multilingual() && $translations = translation_node_get_translations($node->tnid->value)) {
     $languages = language_list(LANGUAGE_ALL);
 
     // There might be a language provider enabled defining custom language
@@ -260,12 +260,12 @@ function translation_node_view(Node $node, $view_mode) {
     // configurable language type in core, we use it as default. Contributed
     // modules can change this behavior by setting the system variable below.
     $type = variable_get('translation_language_type', LANGUAGE_TYPE_INTERFACE);
-    $custom_links = language_negotiation_get_switch_links($type, "node/$node->nid");
+    $custom_links = language_negotiation_get_switch_links($type, 'node/' . $node->nid->value);
     $links = array();
 
     foreach ($translations as $langcode => $translation) {
       // Do not show links to the same node or to unpublished translations.
-      if ($translation->status && isset($languages[$langcode]) && $langcode != $node->langcode) {
+      if ($translation->status && isset($languages[$langcode]) && $langcode != $node->langcode->value) {
         $key = "translation_$langcode";
 
         if (isset($custom_links->links[$langcode])) {
@@ -303,9 +303,9 @@ function translation_node_view(Node $node, $view_mode) {
  */
 function translation_node_prepare(Node $node) {
   // Only act if we are dealing with a content type supporting translations.
-  if (translation_supported_type($node->type) &&
+  if (translation_supported_type($node->type->value) &&
     // And it's a new node.
-    empty($node->nid) &&
+    empty($node->nid->value) &&
     // And the $_GET variables are set properly.
     isset($_GET['translation']) &&
     isset($_GET['target']) &&
@@ -315,16 +315,16 @@ function translation_node_prepare(Node $node) {
 
     $language_list = language_list();
     $langcode = $_GET['target'];
-    if (!isset($language_list[$langcode]) || ($source_node->langcode == $langcode)) {
+    if (!isset($language_list[$langcode]) || ($source_node->langcode->value == $langcode)) {
       // If not supported language, or same language as source node, break.
       return;
     }
 
     // Ensure we don't have an existing translation in this language.
-    if (!empty($source_node->tnid)) {
-      $translations = translation_node_get_translations($source_node->tnid);
+    if (!empty($source_node->tnid->value)) {
+      $translations = translation_node_get_translations($source_node->tnid->value);
       if (isset($translations[$langcode])) {
-        drupal_set_message(t('A translation of %title in %language already exists, a new %type will be created instead of a translation.', array('%title' => $source_node->label(), '%language' => $language_list[$langcode]->name, '%type' => $node->type)), 'error');
+        drupal_set_message(t('A translation of %title in %language already exists, a new %type will be created instead of a translation.', array('%title' => $source_node->label(), '%language' => $language_list[$langcode]->name, '%type' => $node->type->value)), 'error');
         return;
       }
     }
@@ -332,11 +332,11 @@ function translation_node_prepare(Node $node) {
     // Populate fields based on source node.
     $node->langcode = $langcode;
     $node->translation_source = $source_node;
-    $node->title = $source_node->title;
+    $node->title = $source_node->title->value;
 
     // Add field translations and let other modules module add custom translated
     // fields.
-    field_attach_prepare_translation('node', $node, $node->langcode, $source_node, $source_node->langcode);
+    field_attach_prepare_translation('node', $node, $node->langcode->value, $source_node, $source_node->langcode->value);
   }
 }
 
@@ -345,7 +345,7 @@ function translation_node_prepare(Node $node) {
  */
 function translation_node_insert(Node $node) {
   // Only act if we are dealing with a content type supporting translations.
-  if (translation_supported_type($node->type)) {
+  if (translation_supported_type($node->type->value)) {
     if (!empty($node->translation_source)) {
       if ($node->translation_source->tnid) {
         // Add node to existing translation set.
@@ -353,7 +353,7 @@ function translation_node_insert(Node $node) {
       }
       else {
         // Create new translation set, using nid from the source node.
-        $tnid = $node->translation_source->nid;
+        $tnid = $node->translation_source->nid-;
         db_update('node')
           ->fields(array(
             'tnid' => $tnid,
@@ -367,7 +367,7 @@ function translation_node_insert(Node $node) {
           'tnid' => $tnid,
           'translate' => 0,
         ))
-        ->condition('nid', $node->nid)
+        ->condition('nid', $node->nid->value)
         ->execute();
       // Save tnid to avoid loss in case of resave.
       $node->tnid = $tnid;
@@ -380,22 +380,22 @@ function translation_node_insert(Node $node) {
  */
 function translation_node_update(Node $node) {
   // Only act if we are dealing with a content type supporting translations.
-  if (translation_supported_type($node->type)) {
-    if (isset($node->translation) && $node->translation && !empty($node->langcode) && $node->tnid) {
+  if (translation_supported_type($node->type->value)) {
+    if (isset($node->translation) && $node->translation && !empty($node->langcode->value) && $node->tnid->value) {
       // Update translation information.
       db_update('node')
         ->fields(array(
-          'tnid' => $node->tnid,
+          'tnid' => $node->tnid->value,
           'translate' => $node->translation['status'],
         ))
-        ->condition('nid', $node->nid)
+        ->condition('nid', $node->nid->value)
         ->execute();
       if (!empty($node->translation['retranslate'])) {
         // This is the source node, asking to mark all translations outdated.
         db_update('node')
           ->fields(array('translate' => 1))
-          ->condition('nid', $node->nid, '<>')
-          ->condition('tnid', $node->tnid)
+          ->condition('nid', $node->nid->value, '<>')
+          ->condition('tnid', $node->tnid->value)
           ->execute();
       }
     }
@@ -410,10 +410,10 @@ function translation_node_update(Node $node) {
 function translation_node_validate(Node $node, $form, &$form_state) {
   // Only act on translatable nodes with a tnid or translation_source.
   $form_node = $form_state['controller']->getEntity($form_state);
-  if (translation_supported_type($node->type) && (!empty($node->tnid) || !empty($form_node->translation_source->nid))) {
-    $tnid = !empty($node->tnid) ? $node->tnid : $form_node->translation_source->nid;
+  if (translation_supported_type($node->type->value) && (!empty($node->tnid->value) || !empty($form_node->translation_source->nid))) {
+    $tnid = !empty($node->tnid->value) ? $node->tnid->value : $form_node->translation_source->nid;
     $translations = translation_node_get_translations($tnid);
-    if (isset($translations[$node->langcode]) && $translations[$node->langcode]->nid != $node->nid) {
+    if (isset($translations[$node->langcode->value]) && $translations[$node->langcode->value]->nid != $node->nid->value) {
       form_set_error('langcode', t('There is already a translation in this language.'));
     }
   }
@@ -424,7 +424,7 @@ function translation_node_validate(Node $node, $form, &$form_state) {
  */
 function translation_node_predelete(Node $node) {
   // Only act if we are dealing with a content type supporting translations.
-  if (translation_supported_type($node->type)) {
+  if (translation_supported_type($node->type->value)) {
     translation_remove_from_set($node);
   }
 }
@@ -436,30 +436,30 @@ function translation_node_predelete(Node $node) {
  *   A node entity.
  */
 function translation_remove_from_set($node) {
-  if (isset($node->tnid)) {
+  if (isset($node->tnid->value)) {
     $query = db_update('node')
       ->fields(array(
         'tnid' => 0,
         'translate' => 0,
       ));
-    if (db_query('SELECT COUNT(*) FROM {node} WHERE tnid = :tnid', array(':tnid' => $node->tnid))->fetchField() == 1) {
+    if (db_query('SELECT COUNT(*) FROM {node} WHERE tnid = :tnid', array(':tnid' => $node->tnid->value))->fetchField() == 1) {
       // There is only one node left in the set: remove the set altogether.
       $query
-        ->condition('tnid', $node->tnid)
+        ->condition('tnid', $node->tnid->value)
         ->execute();
     }
     else {
       $query
-        ->condition('nid', $node->nid)
+        ->condition('nid', $node->nid->value)
         ->execute();
 
       // If the node being removed was the source of the translation set,
       // we pick a new source - preferably one that is up to date.
-      if ($node->tnid == $node->nid) {
-        $new_tnid = db_query('SELECT nid FROM {node} WHERE tnid = :tnid ORDER BY translate ASC, nid ASC', array(':tnid' => $node->tnid))->fetchField();
+      if ($node->tnid->value == $node->nid->value) {
+        $new_tnid = db_query('SELECT nid FROM {node} WHERE tnid = :tnid ORDER BY translate ASC, nid ASC', array(':tnid' => $node->tnid->value))->fetchField();
         db_update('node')
           ->fields(array('tnid' => $new_tnid))
-          ->condition('tnid', $node->tnid)
+          ->condition('tnid', $node->tnid->value)
           ->execute();
       }
     }
@@ -493,7 +493,7 @@ function translation_node_get_translations($tnid) {
         ->execute();
 
       foreach ($result as $node) {
-        $translations[$tnid][$node->langcode] = $node;
+        $translations[$tnid][$node->langcode->value] = $node;
       }
     }
     return $translations[$tnid];
@@ -523,9 +523,9 @@ function translation_supported_type($type) {
 function translation_path_get_translations($path) {
   $paths = array();
   // Check for a node related path, and for its translations.
-  if ((preg_match("!^node/(\d+)(/.+|)$!", $path, $matches)) && ($node = node_load((int) $matches[1])) && !empty($node->tnid)) {
-    foreach (translation_node_get_translations($node->tnid) as $language => $translation_node) {
-      $paths[$language] = 'node/' . $translation_node->nid . $matches[2];
+  if ((preg_match("!^node/(\d+)(/.+|)$!", $path, $matches)) && ($node = node_load((int) $matches[1])) && !empty($node->tnid->value)) {
+    foreach (translation_node_get_translations($node->tnid->value) as $language => $translation_node) {
+      $paths[$language] = 'node/' . $translation_node->nid->value . $matches[2];
     }
   }
   return $paths;
@@ -542,18 +542,18 @@ function translation_language_switch_links_alter(array &$links, $type, $path) {
   if ($type == $language_type && preg_match("!^node/(\d+)(/.+|)!", $path, $matches)) {
     $node = node_load((int) $matches[1]);
 
-    if (empty($node->tnid)) {
+    if (empty($node->tnid->value)) {
       // If the node cannot be found nothing needs to be done. If it does not
       // have translations it might be a language neutral node, in which case we
       // must leave the language switch links unaltered. This is true also for
       // nodes not having translation support enabled.
-      if (empty($node) || $node->langcode == LANGUAGE_NOT_SPECIFIED || !translation_supported_type($node->type)) {
+      if (empty($node) || $node->langcode->value == LANGUAGE_NOT_SPECIFIED || !translation_supported_type($node->type->value)) {
         return;
       }
-      $translations = array($node->langcode => $node);
+      $translations = array($node->langcode->value => $node);
     }
     else {
-      $translations = translation_node_get_translations($node->tnid);
+      $translations = translation_node_get_translations($node->tnid->value);
     }
 
     foreach ($links as $langcode => $link) {
diff --git a/core/modules/translation/translation.pages.inc b/core/modules/translation/translation.pages.inc
index a501870..d07c4a6 100644
--- a/core/modules/translation/translation.pages.inc
+++ b/core/modules/translation/translation.pages.inc
@@ -21,15 +21,15 @@
 function translation_node_overview(Node $node) {
   include_once DRUPAL_ROOT . '/core/includes/language.inc';
 
-  if ($node->tnid) {
+  if ($node->tnid->value) {
     // Already part of a set, grab that set.
-    $tnid = $node->tnid;
-    $translations = translation_node_get_translations($node->tnid);
+    $tnid = $node->tnid->value;
+    $translations = translation_node_get_translations($node->tnid->value);
   }
   else {
     // We have no translation source nid, this could be a new set, emulate that.
-    $tnid = $node->nid;
-    $translations = array($node->langcode => $node);
+    $tnid = $node->nid->value;
+    $translations = array($node->langcode->value => $node);
   }
 
   $type = variable_get('translation_language_type', LANGUAGE_TYPE_INTERFACE);
@@ -42,18 +42,18 @@ function translation_node_overview(Node $node) {
       // Existing translation in the translation set: display status.
       // We load the full node to check whether the user can edit it.
       $translation_node = node_load($translations[$langcode]->nid);
-      $path = 'node/' . $translation_node->nid;
+      $path = 'node/' . $translation_node->nid->value;
       $links = language_negotiation_get_switch_links($type, $path);
       $title = empty($links->links[$langcode]['href']) ? l($translation_node->label(), $path) : l($translation_node->label(), $links->links[$langcode]['href'], $links->links[$langcode]);
       if (node_access('update', $translation_node)) {
         $text = t('edit');
-        $path = 'node/' . $translation_node->nid . '/edit';
+        $path = 'node/' . $translation_node->nid->value . '/edit';
         $links = language_negotiation_get_switch_links($type, $path);
         $options[] = empty($links->links[$langcode]['href']) ? l($text, $path) : l($text, $links->links[$langcode]['href'], $links->links[$langcode]);
       }
-      $status = $translation_node->status ? t('Published') : t('Not published');
-      $status .= $translation_node->translate ? ' - <span class="marker">' . t('outdated') . '</span>' : '';
-      if ($translation_node->nid == $tnid) {
+      $status = $translation_node->status->value ? t('Published') : t('Not published');
+      $status .= $translation_node->translate->value ? ' - <span class="marker">' . t('outdated') . '</span>' : '';
+      if ($translation_node->nid->value == $tnid) {
         $language_name = t('<strong>@language_name</strong> (source)', array('@language_name' => $language_name));
       }
     }
@@ -62,9 +62,9 @@ function translation_node_overview(Node $node) {
       $title = t('n/a');
       if (node_access('create', $node)) {
         $text = t('add translation');
-        $path = 'node/add/' . $node->type;
+        $path = 'node/add/' . $node->type->value;
         $links = language_negotiation_get_switch_links($type, $path);
-        $query = array('query' => array('translation' => $node->nid, 'target' => $langcode));
+        $query = array('query' => array('translation' => $node->nid->value, 'target' => $langcode));
         $options[] = empty($links->links[$langcode]['href']) ? l($text, $path, $query) : l($text, $links->links[$langcode]['href'], array_merge_recursive($links->links[$langcode], $query));
       }
       $status = t('Not translated');
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
index 0d12cff..5fa08f5 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserCancelTest.php
@@ -58,8 +58,8 @@ function testUserCancelWithoutPermission() {
     $this->assertTrue($account->status == 1, t('User account was not canceled.'));
 
     // Confirm user's content has not been altered.
-    $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue(($test_node->uid == $account->uid && $test_node->status == 1), t('Node of the user has not been altered.'));
+    $test_node = node_load($node->nid->value, TRUE);
+    $this->assertTrue(($test_node->uid->value == $account->uid && $test_node->status->value == 1), t('Node of the user has not been altered.'));
   }
 
   /**
@@ -139,8 +139,8 @@ function testUserCancelInvalid() {
     $this->assertTrue($account->status, t('User account was not canceled.'));
 
     // Confirm user's content has not been altered.
-    $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue(($test_node->uid == $account->uid && $test_node->status == 1), t('Node of the user has not been altered.'));
+    $test_node = node_load($node->nid->value, TRUE);
+    $this->assertTrue(($test_node->uid->value == $account->uid && $test_node->status->value == 1), t('Node of the user has not been altered.'));
   }
 
   /**
@@ -213,10 +213,10 @@ function testUserBlockUnpublish() {
     $this->assertTrue($account->status == 0, t('User has been blocked.'));
 
     // Confirm user's content has been unpublished.
-    $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue($test_node->status == 0, t('Node of the user has been unpublished.'));
-    $test_node = node_revision_load($node->vid);
-    $this->assertTrue($test_node->status == 0, t('Node revision of the user has been unpublished.'));
+    $test_node = node_load($node->nid->value, TRUE);
+    $this->assertTrue($test_node->status->value == 0, t('Node of the user has been unpublished.'));
+    $test_node = node_revision_load($node->vid->value);
+    $this->assertTrue($test_node->status->value == 0, t('Node revision of the user has been unpublished.'));
 
     // Confirm user is logged out.
     $this->assertNoText($account->name, t('Logged out.'));
@@ -240,7 +240,7 @@ function testUserAnonymize() {
     // Create a node with two revisions, the initial one belonging to the
     // cancelling user.
     $revision_node = $this->drupalCreateNode(array('uid' => $account->uid));
-    $revision = $revision_node->vid;
+    $revision = $revision_node->vid->value;
     $settings = get_object_vars($revision_node);
     $settings['revision'] = 1;
     $settings['uid'] = 1; // Set new/current revision to someone else.
@@ -262,12 +262,12 @@ function testUserAnonymize() {
     $this->assertFalse(user_load($account->uid, TRUE), t('User is not found in the database.'));
 
     // Confirm that user's content has been attributed to anonymous user.
-    $test_node = node_load($node->nid, TRUE);
-    $this->assertTrue(($test_node->uid == 0 && $test_node->status == 1), t('Node of the user has been attributed to anonymous user.'));
+    $test_node = node_load($node->nid->value, TRUE);
+    $this->assertTrue(($test_node->uid->value == 0 && $test_node->status->value == 1), t('Node of the user has been attributed to anonymous user.'));
     $test_node = node_revision_load($revision, TRUE);
-    $this->assertTrue(($test_node->revision_uid == 0 && $test_node->status == 1), t('Node revision of the user has been attributed to anonymous user.'));
-    $test_node = node_load($revision_node->nid, TRUE);
-    $this->assertTrue(($test_node->uid != 0 && $test_node->status == 1), t("Current revision of the user's node was not attributed to anonymous user."));
+    $this->assertTrue(($test_node->revision_uid->value == 0 && $test_node->status->value == 1), t('Node revision of the user has been attributed to anonymous user.'));
+    $test_node = node_load($revision_node->nid->value, TRUE);
+    $this->assertTrue(($test_node->uid->value != 0 && $test_node->status->value == 1), t("Current revision of the user's node was not attributed to anonymous user."));
 
     // Confirm that user is logged out.
     $this->assertNoText($account->name, t('Logged out.'));
@@ -294,7 +294,7 @@ function testUserDelete() {
     $edit['subject'] = $this->randomName(8);
     $edit['comment_body[' . $langcode . '][0][value]'] = $this->randomName(16);
 
-    $this->drupalPost('comment/reply/' . $node->nid, $edit, t('Preview'));
+    $this->drupalPost('comment/reply/' . $node->nid->value, $edit, t('Preview'));
     $this->drupalPost(NULL, array(), t('Save'));
     $this->assertText(t('Your comment has been posted.'));
     $comments = entity_load_multiple_by_properties('comment', array('subject' => $edit['subject']));
@@ -304,7 +304,7 @@ function testUserDelete() {
     // Create a node with two revisions, the initial one belonging to the
     // cancelling user.
     $revision_node = $this->drupalCreateNode(array('uid' => $account->uid));
-    $revision = $revision_node->vid;
+    $revision = $revision_node->vid->value;
     $settings = get_object_vars($revision_node);
     $settings['revision'] = 1;
     $settings['uid'] = 1; // Set new/current revision to someone else.
@@ -326,9 +326,9 @@ function testUserDelete() {
     $this->assertFalse(user_load($account->uid, TRUE), t('User is not found in the database.'));
 
     // Confirm that user's content has been deleted.
-    $this->assertFalse(node_load($node->nid, TRUE), t('Node of the user has been deleted.'));
+    $this->assertFalse(node_load($node->nid->value, TRUE), t('Node of the user has been deleted.'));
     $this->assertFalse(node_revision_load($revision), t('Node revision of the user has been deleted.'));
-    $this->assertTrue(node_load($revision_node->nid, TRUE), t("Current revision of the user's node was not deleted."));
+    $this->assertTrue(node_load($revision_node->nid->value, TRUE), t("Current revision of the user's node was not deleted."));
     $this->assertFalse(comment_load($comment->cid), t('Comment of the user has been deleted.'));
 
     // Confirm that user is logged out.
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php b/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php
index 9ed88ca..fdc381d 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php
@@ -100,7 +100,7 @@ function testUserSignature() {
     $edit = array();
     $edit['subject'] = $this->randomName(8);
     $edit['comment_body[' . $langcode . '][0][value]'] = $this->randomName(16);
-    $this->drupalPost('comment/reply/' . $node->nid, $edit, t('Preview'));
+    $this->drupalPost('comment/reply/' . $node->nid->value, $edit, t('Preview'));
     $this->drupalPost(NULL, array(), t('Save'));
 
     // Get the comment ID. (This technique is the same one used in the Comment
@@ -115,7 +115,7 @@ function testUserSignature() {
     $this->drupalPost('comment/' . $comment_id . '/edit', $edit, t('Save'));
 
     // Assert that the signature did not make it through unfiltered.
-    $this->drupalGet('node/' . $node->nid);
+    $this->drupalGet('node/' . $node->nid->value);
     $this->assertNoRaw($signature_text, 'Unfiltered signature text not found.');
     $this->assertRaw(check_markup($signature_text, $this->plain_text_format->format), 'Filtered signature text found.');
   }
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index e42002b..2f6168c 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -2933,7 +2933,7 @@ function user_node_load($nodes, $types) {
   // Build an array of all uids for node authors, keyed by nid.
   $uids = array();
   foreach ($nodes as $nid => $node) {
-    $uids[$nid] = $node->uid;
+    $uids[$nid] = $node->uid->value;
   }
 
   // Fetch name, picture, and data for these users.
diff --git a/core/themes/bartik/templates/comment-wrapper.tpl.php b/core/themes/bartik/templates/comment-wrapper.tpl.php
index 6c90f54..cbcd1f3 100644
--- a/core/themes/bartik/templates/comment-wrapper.tpl.php
+++ b/core/themes/bartik/templates/comment-wrapper.tpl.php
@@ -34,7 +34,7 @@
  */
 ?>
 <div id="comments" <?php print $attributes; ?>>
-  <?php if ($content['comments'] && $node->type != 'forum'): ?>
+  <?php if ($content['comments'] && $node->type->value != 'forum'): ?>
     <?php print render($title_prefix); ?>
     <h2 class="title"><?php print t('Comments'); ?></h2>
     <?php print render($title_suffix); ?>
diff --git a/core/themes/bartik/templates/node.tpl.php b/core/themes/bartik/templates/node.tpl.php
index ce30175..ebd8289 100644
--- a/core/themes/bartik/templates/node.tpl.php
+++ b/core/themes/bartik/templates/node.tpl.php
@@ -78,7 +78,7 @@
  * @ingroup themeable
  */
 ?>
-<div id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
+<div id="node-<?php print $node->nid->value; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
 
   <?php print render($title_prefix); ?>
   <?php if (!$page): ?>
