I think it would be better to return the entity rather than just the id when the entity is created, as it's sometimes useful to have all the data returned which can then be used. This is also more consistant with how node create works.

Comments

joachim’s picture

+1

Most entities will have added extra data after saving too -- eg the creation time, which you may want.

joachim’s picture

Title: Return on entity rather than entity id on create » Return an entity rather than entity id on create
Version: 7.x-2.0-alpha1 » 7.x-2.x-dev
wodenx’s picture

Status: Active » Fixed

It looks to me like this has already been implemented --- see services_entity_resource_clean.inc at line 42, and services_entity_resource.inc at line 45. Reopen if I'm wrong.

joachim’s picture

Status: Fixed » Closed (duplicate)

I'm going to flip these over, as that other issue has the patch.