Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] compiler, database, mongo: We can't modify _id with mongo

  • Loading branch information...
commit b3abbf46661419092d591819c51d0050d0457cd3 1 parent 371df48
@BourgerieQuentin BourgerieQuentin authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 opa/pass_MongoAccessGeneration.ml
View
7 opa/pass_MongoAccessGeneration.ml
@@ -264,7 +264,12 @@ module Generator = struct
match set with
| [] -> acc
| (field, value)::q ->
- aux (add_to_document gamma annotmap field value doc) q
+ (*Special case for _id fields we can't modify.
+ Mongo restriction : TODO ?*)
+ if field = "_id" then
+ aux acc q
+ else
+ aux (add_to_document gamma annotmap field value doc) q
in
if addset then (
let annotmap, sexpr = aux (C.list (annotmap, gamma) []) set in
Please sign in to comment.
Something went wrong with that request. Please try again.