What is the entity ID for private messages? I want to access some private messages using entity_load() but I don't know what the entity ID is to call them by.  I have the message ID (mid) but that doesn't appear to work.

I'm attempting to load an individual message like this:

      $message_entity = entity_load('privatemsg_message', array($row['mid']));


And this is how Private Message declares hook_entity_property_info().

/**
 * Implements hook_entity_property_info().
 */
function privatemsg_entity_property_info() {
  $info = array();
  // Add meta-data about the basic node properties.
  $properties = &amp;$info['privatemsg_message']['properties'];
  $properties = array(
    'mid' =&gt; array(
      'type'  =&gt; 'integer',
      'label' =&gt; t('Private message ID'),
      'description' =&gt; t('Private message ID'),
    ),
    'thread_id' =&gt; array(
      'type'  =&gt; 'integer',
      'label' =&gt; t('Private message thread ID'),
      'description' =&gt; t('Private message thread ID'),
      'getter callback' =&gt; 'entity_property_verbatim_get',
    ),
    'author' =&gt; array(
      'type'  =&gt; 'user',
      'label' =&gt; t('Private message author'),
      'description' =&gt; t('Private message author'),
      'setter callback' =&gt; 'entity_property_verbatim_set',
    ),
    'subject' =&gt; array(
      'type'  =&gt; 'text',
      'label' =&gt; t('Private message subject'),
      'description' =&gt; t('Private message subject'),
      'setter callback' =&gt; 'entity_property_verbatim_set',
    ),
    'body' =&gt; array(
      'type'  =&gt; 'text',
      'label' =&gt; t('Private message body'),
      'description' =&gt; t('Private message body'),
      'setter callback' =&gt; 'entity_property_verbatim_set',
    ),
    'timestamp' =&gt; array(
      'type' =&gt; 'date',
      'label' =&gt; t('Private message sent date'),
      'description' =&gt; t('Private message sent date'),
    ),
  );
  return $info;
}


How do I get the entity ID for private messages?  Is that different than the message ID (mid) or thread ID (thread_id)?
It turns out mid is correct, but for whatever reason $row['mid'] was returning a string, not an int.  Type-casting the string as an int solved the problem.