-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Please see http://gist.github.com/281582 for details.
In summary, I have a Site model (top level document) that has_many domains (Domain model should be an embedded document). I have created a unique index on a field in the embedded document and it appears to prevent duplicate entries. Unfortunately, a save! encounters a silent failure and still returns true. This can be seen on lines 37 - 38 and on lines 53 - 57 in the gist. Hopefully this makes sense. I can try to explain it better if necessary.