After loading all entities of a given type, EntityAPIController:load() will return false when trying to load a specific revision of the same entity type.

The corresponding code also states that it should alway trigger for a revision load,

// Load any remaining entities from the database. This is the case if $ids
// is set to FALSE (so we load all entities), if there are any ids left to
// load or if loading a revision.

but it is possible to have it not trigger, even when loading a revision. So the change would be to always trigger the loading when a revision id is provided.

Adding a failing patch with a test that illustrates this behavior, plus a possible fix.

Comments

Lendude created an issue. See original summary.

The last submitted patch, entity_api_revision_load_after_load_all_SHOULD_FAIL.patch, failed testing.

lendude’s picture

Issue summary: View changes
chris matthews’s picture

The 3 year old patch to entity.test and entity.controller.inc applied cleanly to the latest entity 7.x-1.x-dev and (if still relevant) needs review.