title: Dynamoose - cannot query and where with 2 keys
body: <p>I have opened a related issue on GitHub, but maybe someone here will be able to help quicker.</p>
  
  <h3>Summary:</h3>
  
  <p><code>ValidationException: Query key condition not supported</code>
  I need to find records in last (amount) seconds on a given location.
  Pretty simple, but already related to other issues:
  <a href="https://github.com/dynamoosejs/dynamoose/issues/382" rel="nofollow noreferrer">One</a> and <a href="https://github.com/dynamoosejs/dynamoose/issues/119" rel="nofollow noreferrer">another one</a></p>
  
  <p><strong>WORKS</strong>: </p>
  
  <p><code>Activity.query('locationId').eq(locationId).exec();</code></p>
  
  <p><strong>DOES NOT WORK</strong>: </p>
  
  <p><code>Activity.query('locationId').eq(locationId).where('createdAt').ge(date).exec();</code></p>
  
  <h3>Code sample:</h3>
  
  Schema
  
  <pre><code>const Activity = (dynamoose: typeof dynamooseType) =&gt; dynamoose.model&lt;ActivityType, {}&gt;('Activity',
      new Schema({
        id: {
          type: String,
          default: () =&gt; {
            return uuid();
          },
          hashKey: true,
        },
        userId: {
          type: String,
        },
        locationId: {
          type: String,
          rangeKey: true,
          index: {
            global: true,
          },
        },
        createdAt: { type: Number, rangeKey: true, required: true, default: Date.now },
        action: {
          type: Number,
        },
      }, {
        expires: 60 * 60 * 24 * 30 * 3, //  activity logs to expire after 3 months
      }));
  </code></pre>
  
  Code which executes the function
  
  <p>Funny part is that I found this as workaround proposed to be used until they merge PR giving ability to specify timestamps as keys, but unfortunately it does not work.</p>
  
  <pre><code>async getActivitiesInLastSeconds(locationId: string, timeoutInSeconds: number) {
      const Activity = schema.Activity(this.dynamoose);
      const date = moment().subtract(timeoutInSeconds, 'seconds').valueOf();
      return await Activity.query('locationId').eq(locationId)
        .where('createdAt').ge(date).exec();
    }
  </code></pre>