I have a the following code:
// Create an Entity with wrapper
$node = entity_create('node', array('type' => 'person'));
$entity = entity_metadata_wrapper('node', $node);
// Add a node title
$entity->title = $person['name'];
// Add the address information
$entity->field_person_address->thoroughfare = $person['address'];
$entity->field_person_address->locality = $person['city'];
$entity->field_person_address->administrative_area = $person['state'];
$entity->field_person_address->postal_code = $person['postalcode'];
$entity->field_person_address->country = $person['country'];
// Save the entity
$entity->save();
The data is saved in the DB perfeclty, but I need to get the entity ID of the new save node.
How do I do that?