Permalink
Browse files

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

  • Loading branch information...
1 parent 371df48 commit b3abbf46661419092d591819c51d0050d0457cd3 @BourgerieQuentin BourgerieQuentin committed Apr 2, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 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

0 comments on commit b3abbf4

Please sign in to comment.