title: Possible Breeze 1.4.8 Bug? fetchEntityByKey not waiting for metadata
body: <p>I have the following code that went from this:</p>
  
  <pre><code>        var getUserByGuid = function (guid, entityObservable) {
          return datacontext.manager.user.fetchEntityByKey('User', guid, true)
                          .then(fetchSucceeded)
                          .fail(queryFailed);
  
          function fetchSucceeded(data) {
              var entity = data.entity;
              if (ko.isWriteableObservable(entityObservable))
                  entityObservable(entity);
              return entity;
          }
  
          function queryFailed(error) {
              logger.error(error);
          }
      };
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>        var getUserByGuid = function (guid, entityObservable) {
          if (datacontext.manager.user.metadataStore.isEmpty()) {
              return datacontext.manager.user.metadataStore.fetchMetadata('breeze/user')
                  .then(function () {
                      return datacontext.manager.user.fetchEntityByKey('User', guid, true)
                          .then(fetchSucceeded)
                          .fail(queryFailed);
                  });
          } else {
              return datacontext.manager.user.fetchEntityByKey('User', guid, true)
                          .then(fetchSucceeded)
                          .fail(queryFailed);
          }
  
          function fetchSucceeded(data) {
              var entity = data.entity;
              if (ko.isWriteableObservable(entityObservable))
                  entityObservable(entity);
              return entity;
          }
  
          function queryFailed(error) {
              logger.error(error);
          }
      };
  </code></pre>
  
  <p>Notice the extra check to verify metadataStore is ready?  Since I am making a call to fetch, I would assume this check would happen internally but for some reason it is not.</p>
  
  <p>My code runs well with the following "work-around" in place but wanted to bring this to light.</p>