mongoid/mongoid — Issue #1362: Field name aliases
Author: y8
Created: 2011-10-20 16:29:40+00:00
State: open

In some cases, when we have huge collection of relatively small objects, there will be a huge storage overhead, caused by human-friendly naming.

It will be great, to have *aliases* or `, for example:

````ruby
class Measure
field :measured_at, type: DateTime, name: "d"
field :instrument_id, type: Integer, name: "i"
field :value, type: Integer, name: "v"
field :quality, type: Integer, name: "q"
end
`````

After explicitly setting `name` in `field`, mongoid will automatically change original field names in criteria, to real one.