Feature branch of Drupal module Entity API (http://drupal.org/project/entity). See corresponding issue: http://drupal.org/node/1332004.