Spring Data MongoDB: query for month
<p>I'm working on a webApp with Spring-boot, I am looking to create a query findByMonth(int or String month) but I would like to be able to use for example findByNameAndMonth(String name, month) or findByIdAndMonth() is it possible?
The date has LocalDate type.</p>

<p>I have an Object like this :</p>

<pre><code>public final class Alarm {
  @id
  private final String id;
  private final String type;
  // ....
  private final LocalDate date; 
</code></pre>

<p>and its a mongoRepository:</p>

<pre><code> public interface AlarmRepository extends MongoRepository&lt;Alarm, String&gt;{
 }
</code></pre>

<p>The query is supposed to give the same result as this query for example:</p>

<pre><code>db.alarm.find({ $where : 'return this.date.getMonth() == 5'})
</code></pre>