-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: 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.
- related to
-
MONGOID-5336 Allow user-defined symbol/string field types
-
- Closed
-
-
MONGOID-5210 Prefer symbol field types over class ones
-
- Closed
-