-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Active Record allows you to specify a custom field to be used as the primary_key in a relationship. Why is this option not enabled in Mongoid?
I have a collection storing some data which I receive from an API. I have a field called 'external_id' this field holds the primary key (id) provided by the api. This api data has relationships already defined. It would be nice if I could use the external_id as the key to find the related data.
Example: this particular data has a parent_id field. This field holds the same id as the external_id.
Any chance this can be included in Mongoid? If not, what is the reasoning?