springframework data mongodb core query Criteria -
want activity if activity.getusername() == null appropriate activity.getdatetime()
public list<activity> find(activity activity) { query query = new query( criteria .where("datetime").is(activity.getdatetime()) .and("username").is(activity.getusername()) ); return mongotemplate.find(query, activity.class); }
how can this?
Comments
Post a Comment