Skip to content

Commit

Permalink
fix the maxTime setting
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchooly committed Apr 20, 2019
1 parent c050083 commit 1f91b74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions morphia/src/main/java/dev/morphia/query/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ public interface Query<T> extends QueryResults<T>, MongoIterable<T> {
* @param maxTime must be > 0. A value < 0 indicates no limit
* @param maxTimeUnit the unit of time to use
* @return this
* @deprecated use the methods that accept Options directly. This can be replicated using {@code options.modifier("$maxTimeMS",
* MILLISECONDS.convert(value, unit)) }
* @deprecated use the methods that accept Options directly. This can be replicated using {@code options.maxTime(value, unit) }
* @see FindOptions#modifier(String, Object)
*/
@Deprecated
Expand Down
2 changes: 1 addition & 1 deletion morphia/src/main/java/dev/morphia/query/QueryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public Query<T> maxScan(final int value) {
@Override
@Deprecated
public Query<T> maxTime(final long value, final TimeUnit unit) {
getOptions().modifier("$maxTimeMS", MILLISECONDS.convert(value, unit));
getOptions().maxTime(value, unit);
return this;
}

Expand Down

0 comments on commit 1f91b74

Please sign in to comment.