Announcement Announcement Module
Collapse
No announcement yet.
Using Spring Data Mongo how doi do where I am trying to find everyone over 19 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Spring Data Mongo how doi do where I am trying to find everyone over 19

    Using Spring-Data-Mongo how do I where search?

    I am trying to find everyone over 19 but under 50 years old? the field is called "age"


    Code:
    public void countAllPersons() 
        {
          List<Person> results = mongoTemplate.findAll(Person.class);
          logger.info("Total number in database: {}", results.size());
        }
Working...
X