How to save a custom entity to database using Rules component

I have defined the custom entity on hook_entity_info():

function mymodule_entity_info(){
  return array(
    'mymodule_account' => array(
      'label' => 'MyModule Account',
      'entity class' => 'MymoduleAccount',
      'controller class' => 'EntityAPIController',
      'views controller class' => 'EntityDefaultViewsController',
      'base table' => 'mymodule_accounts',
      'entity keys' => array(
        'id' => 'aid',
      ),
      'fieldable' => TRUE,
      'load hook' => 'mymodule_account_load',
      'view modes' => array(
        'full' => array('label' => 'Full', 'custom settings' => FALSE),
        'teaser' => array('label' => 'Teaser', 'custom settings' => FALSE),
      ),
    ),

  );
}

I have also extended the Entity class, overriding it’s __constructor() method:

class MymoduleAccount extends Entity{

  public function __construct(array $values = array(), $entityType = 
  'mymodule_account'){

    global $user;
    if(empty($values)){
      $values['created'] = REQUEST_TIME;
      $values['title'] = '';
      $values['balance'] = 0.00;
      $values['uid'] = $user->uid;
    }

    $this->entityType = $entityType;
    $this->setUp();
    // Set initial values.
    foreach ($values as $key => $value) {
      $this->$key = $value;
    }
  }
}

Finally, I set up a rules action-set component to (1)create and (2)save of this custom entity to database:

Create a new entity
Parameter: Entity type: Mymodule Account
Provides variables: Created entity (entity_created)
Save entity
Parameter: Entity: [entity-created]

So I execute this component, I don’t see any entity saved in the database. I can confirm that the entity is created by including a dpm($message) in it’s consrtuctor, so it’s only the saving part that’s failed. What am I missing in the custom entity definition/configuration that’s stopping it successfully saving to database table?

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed