Closed (fixed)
Project:
Services Entity API
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Apr 2013 at 19:59 UTC
Updated:
8 Mar 2014 at 22:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joachim commentedThere is no support for revisions in this module currently.
Your use of "parameters[vid]=X" is working purely nodes have a 'vid' column and the resulting query makes sense. Hence you're not loading a revision, you're just specifying a condition which the node happens to satisfy.
Supporting revisions in the way you'd like would probably mean major changes to the module.
Comment #3
wodenx commentedReopening. The attached patch allows specifying a "revision=" query param on GET requests to retrieve a specified revision. No support for update or delete.
Comment #5
wodenx commentedComment #6
wodenx commented#3: 1981890-3-services_entity-revisions.patch queued for re-testing.
Comment #7
wodenx commentedI think the original failure was because I hadn't changed the version for the issue. Now it's not testing, but the patch applies cleanly to 7.x-2.x-dev.
Comment #8
joachim commentedOur tests are broken anyway: #1950766: remove 1.x version tests from 2.x -- test class calls undefined function _services_entity_transform_fields().
Comment #9
joachim commentedLooks fine to me, not tried it out.
Comment #10
wodenx commentedPostponing until we have working tests.
Comment #11
wodenx commentedWould like to see this get into the next release. Marking as needs-work bc I need to complete a test.
Comment #12
wodenx commentedHere's a new version with a test.
Comment #13
wodenx commentedUpdated patch to apply to HEAD. Would like to see this in the next release.
Comment #14
joachim commentedI think this should get its own call to services_error(), for better DX -- something specifically saying that the revision ID does not match up to the entity ID.
But I'm happy for that to be done as a follow-up.
Patch looks good to me otherwise :)
Comment #15
wodenx commentedOK - committed with the suggested modification: http://drupalcode.org/project/services_entity.git/commit/103e0ec