Requires entity version 7.x-1.0 or greater
Original issue #996696: Support revisions in Entity API
Change Records for Entity API http://drupal.org/list-changes/entity
- The revision table for your entity type requires a revision column set to serial type as of entity 7.x-1.0.
- Any additional properties that will be saved in the revision table can be set on the entity object.
- is_new_revision property must be set on the entity object for a new record to be written to the revision table. Otherwise it will update the row corresponding to the current revision. Example:
$entity->is_new_revision = TRUE;
- Also make sure is_new is set to FALSE. Example:
$entity->is_new = FALSE;
- default_revision property must be set on the entity object for the revision being saved to be set as the default revision. Example:
$entity->default_revision = TRUE;
For example check the entity_test.module and entity_test.install files (found within the /test/ directory of the Entity API module).