Typically entities - at least Nodes - will include an "original" property. This contains the unchanged entity loaded directly from the database, see entity_load_unchanged()

Here's what the Node module does on node_save()

<?php
    // Load the stored entity, if any.
    if (!empty($node->nid) && !isset($node->original)) {
      $node->original = entity_load_unchanged('node', $node->nid);
    }

    field_attach_presave('node', $node);
    global $user;

    // Determine if we will be inserting a new node.
    if (!isset($node->is_new)) {
      $node->is_new = empty($node->nid);
    }
?>

Patch incoming to replicate this process.

Comments

mglaman’s picture

Assigned: mglaman » Unassigned
Status: Active » Needs review
StatusFileSize
new658 bytes

Patch attached. This would be a huge feature. Even though it may not seem like much, but it provides a method for tracking changes made between saves.

mglaman’s picture

StatusFileSize
new659 bytes

Fixing patch, copy paste fail :/

damienmckenna’s picture

  • DamienMcKenna committed 8a21c98 on 7.x-1.x authored by mglaman
    Issue #2399623 by mglaman: Include original entity when saving an FPP.
    
damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks Matt!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.