Announcement Announcement Module
Collapse
No announcement yet.
MongoDB Repository Query How to do GreaterThan Or EqualTo? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MongoDB Repository Query How to do GreaterThan Or EqualTo?

    Hi All,

    I know that in constructing a query for MongoDB, I can use gt() or gte(). However, if I use a repository, how do I do a GreaterThanOrEqualTo?

    So, I have a lookup document that has the following fields:

    Code:
    String AccountType;
    Double interest;
    Date effectiveBegin;
    Date effectiveEnd;
    Now, I want to find the interest rate for an account type of "checking" with a date of 1/1/2013.

    How would I do that?

    Code:
    findByAccountTypeAndEffectiveBeginGreaterThanAndEffectiveEndLessThan(String accountType, Date effectiveBegin, Date effectiveEnd);
    The problem is I need GreaterThanOrEqualTo and LessThanOrEqualTo.

    Is there a way?

    Thanks,
    Tom
Working...
X