Allow types to be specified using strings

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, when declaring a field on a Mongoid::Document, you must specify the type as either a symbol (for a limited set of built-in types) or by using the class directly.

      Referencing the class name directly leads to chicken-vs-egg issues (if there are circular dependencies, for example).

      A clean way of dealing with this is to allow types to also be strings, which name the class. We already support this with "Boolean" as a special case (a shorthand for Mongoid::Boolean). I propose we make this a more general solution as well. It is also a much simpler solution than (e.g.) MONGOID-5210.

            Assignee:
            Unassigned
            Reporter:
            Jamis Buck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: