-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix upsert inserts when $and is used with $eq #216
- Loading branch information
1 parent
7ee8cff
commit f20f3cb
Showing
7 changed files
with
108 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
core/src/main/java/de/bwaldvogel/mongo/exception/CannotTraverseElementException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package de.bwaldvogel.mongo.exception; | ||
|
||
public class CannotTraverseElementException extends MongoServerError { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public CannotTraverseElementException() { | ||
super(ErrorCode.PathNotViable, "cannot traverse element"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
core/src/main/java/de/bwaldvogel/mongo/exception/PathNotViableException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
package de.bwaldvogel.mongo.exception; | ||
|
||
import de.bwaldvogel.mongo.bson.Document; | ||
|
||
public class PathNotViableException extends MongoServerError { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public PathNotViableException(String message) { | ||
super(ErrorCode.PathNotViable, message); | ||
private final String field; | ||
|
||
public PathNotViableException(String field, Document element) { | ||
super(ErrorCode.PathNotViable, "Cannot create field '" + field + "' in element " + element.toString(true)); | ||
this.field = field; | ||
} | ||
|
||
public String getField() { | ||
return field; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters