-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: 6.0.2
-
Component/s: None
-
None
Issue is that I want to cache some documents that have an "id" field that is non-unique. If I store them using plain mongo it is fine because `_id` is auto-generated while `id` is irrelevant to the database.
With `mondoid` though it hard aliases `id` to `_id` and there appears to be no way to avoid it. Looks like this is a change in 5.0.0.
I think this breaks usage where developer does not have control over original document format. There should be an option to avoid alias `id` to `_id`.
I tried `self.aliased_fields.clear` which stops doing the aliasing but document id is not auto-generated anymore so creating documents from JSON input breaks for all documents tryto have `null` value for `_id` and that breaks.