Active
Project:
Model Entities
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2016 at 09:44 UTC
Updated:
1 Jun 2016 at 09:44 UTC
Jump to comment: Most recent
Currently when creating an entity, the created & changed fields are empty.
This needs to be specified explicitly as below:
$entity = entity_create('bundle',
array(
'type' => 'my_bundle',
'created' => REQUEST_TIME,
'changed' => REQUEST_TIME,
));
$wrapper = entity_metadata_wrapper('my_bundle', $entity);
$wrapper->save();
Comments