querying for records with date between two dates in mongo
<p>I am having a problem where I am trying to find records with a particular username and where the start date is between a start and end date. I have searched around and below is the seemingly agreed upon answer for how to do this. Unfortunately when I use it I still get the same error:</p>

<p>Due to limitations of the <code>com.mongodb.BasicDBObject</code>, you can't add a second 'start' expression specified</p>

<p>The query I am attempting to use is:</p>

<pre><code>Query query = new Query(
                        Criteria.where("username").is(username)
                            .andOperator(
                                Criteria.where("start").lt(DateUtils.ceiling(date)),
                                Criteria.where("start").gte(DateUtils.floor(date)) 
                             )
                        );
</code></pre>

<p>I am using spring-data-mongoldb 1.8.4.RELEASE</p>