diff --git includes/entity.inc includes/entity.inc
index f7a1080..9c6cbe8 100644
--- includes/entity.inc
+++ includes/entity.inc
@@ -549,6 +549,10 @@ class EntityFieldQuery {
    *
    * 'bundle', 'revision_id' and 'entity_id' have no such restrictions.
    *
+   * Note: The "comment" and "taxonomy_term" entity types don't support bundle
+   * conditions. For "taxonomy_term", propertyCondition('vid') can be used
+   * instead.
+   *
    * @param $name
    *   'entity_type', 'bundle', 'revision_id' or 'entity_id'.
    * @param $value
@@ -680,6 +684,9 @@ class EntityFieldQuery {
    * If called multiple times, the query will order by each specified column in
    * the order this method is called.
    *
+   * Note: The "comment" and "taxonomy_term" entity types don't support ordering
+   * by bundle. For "taxonomy_term", propertyOrderBy('vid') can be used instead.
+   *
    * @param $name
    *   'entity_type', 'bundle', 'revision_id' or 'entity_id'.
    * @param $direction
@@ -965,6 +972,7 @@ class EntityFieldQuery {
       throw new EntityFieldQueryException(t('Entity %entity has no base table.', array('%entity' => $entity_type)));
     }
     $base_table = $entity_info['base table'];
+    $base_table_schema = drupal_get_schema($base_table);
     $select_query = db_select($base_table);
     $select_query->addExpression(':entity_type', 'entity_type', array(':entity_type' => $entity_type));
     // Process the property conditions.
@@ -997,16 +1005,23 @@ class EntityFieldQuery {
     // Handle bundles.
     if (!empty($entity_info['entity keys']['bundle'])) {
       $sql_field = $entity_info['entity keys']['bundle'];
-      $select_query->addField($base_table, $sql_field, 'bundle');
       $having = FALSE;
+
+      if (!empty($base_table_schema['fields'][$sql_field])) {
+        $id_map['bundle'] = $sql_field;
+        $select_query->addField($base_table, $sql_field, 'bundle');
+      }
     }
     else {
       $sql_field = 'bundle';
+      $id_map['bundle'] = $sql_field;
       $select_query->addExpression(':bundle', 'bundle', array(':bundle' => $entity_type));
       $having = TRUE;
     }
-    $id_map['bundle'] = $sql_field;
     if (isset($this->entityConditions['bundle'])) {
+      if ($having == FALSE && empty($base_table_schema['fields'][$sql_field])) {
+        throw new EntityFieldQueryException(t("The entity type @entity_type doesn't support bundle conditions", array('@entity_type' => $entity_type)));
+      }
       $this->addCondition($select_query, $sql_field, $this->entityConditions['bundle'], $having);
     }
 
@@ -1015,7 +1030,13 @@ class EntityFieldQuery {
       if ($order['type'] == 'entity') {
         $key = $order['specifier'];
         if (!isset($id_map[$key])) {
-          throw new EntityFieldQueryException(t('Do not know how to order on @key for @entity_type', array('@key' => $key, '@entity_type' => $entity_type)));
+          if ($key == 'bundle') {
+            $exception_text = t("The entity type @entity_type doesn't support ordering by bundle", array('@entity_type' => $entity_type));
+          }
+          else {
+            $exception_text = t('Do not know how to order on @key for @entity_type', array('@key' => $key, '@entity_type' => $entity_type));
+          }
+          throw new EntityFieldQueryException($exception_text);
         }
         $select_query->orderBy($id_map[$key], $order['direction']);
       }
@@ -1057,7 +1078,8 @@ class EntityFieldQuery {
     }
     $return = array();
     foreach ($select_query->execute() as $partial_entity) {
-      $entity = entity_create_stub_entity($partial_entity->entity_type, array($partial_entity->entity_id, $partial_entity->revision_id, $partial_entity->bundle));
+      $bundle = isset($partial_entity->bundle) ? $partial_entity->bundle : NULL;
+      $entity = entity_create_stub_entity($partial_entity->entity_type, array($partial_entity->entity_id, $partial_entity->revision_id, $bundle));
       $return[$partial_entity->entity_type][$partial_entity->$id_key] = $entity;
       $this->ordered_results[] = $partial_entity;
     }
