Some things about programming, design and methodologies, both in English and in Russian. Translation of some articles that I like into Russian.
Некоторые мысли о программировании, архитектуре и методологиях. Перевод понравившихся статей на Русский.

Apr 29, 2016

Spring Data Mongo Criteria Example

spring-data-mongodb-1.8.4 has a great package , with some features that makes mongodb queries easy. Unfortunately, documentation on this topic is not very good. I'll contribute to it by short example.

Problem

We want to search mongodb using $and and $in keyword based on several fields. But we don't know field configuration beforehead. Input params are fit into domain class: