Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1363

Field name aliases

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.4.0
    • Affects Version/s: None
    • Component/s: None

      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:

      Unable to find source-code formatter for language: `ruby. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            y8 y8
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: