alphagov/content-store — pull request #14 by alext (2014-05-19 13:13:59+00:00)
Title: [Discussion] Use the base_path as mongo's _id field.

Following a discussion with @fatbusinessman, this is an idea for storing the base_path in the _id attribute in Mongo. This saves creating an extra unnecessary field and index. Will also mean that any foreign-key fields will contain more meaningful values.

This uses Mongoid's [field aliasing](http://mongoid.org/en/mongoid/docs/documents.html#fields) to hide most of the details of this, hence no changes were needed outside the model.

Does this seem like a sensible approach?