-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.1.0
-
Component/s: Persistence
-
None
BSON has deprecated the Symbol type, and as a result the Mongo Ruby driver has also deprecated its use.
Since Mongoid is an ODM it should convert attributes with the Symbol type to String during serialization of models to BSON, and convert strings returned in BSON back into Symbols.
By design Mongoid is an ODM that performs these kinds of type conversions. For example BSON does not support Dates, so Mongoid transparently performs the necessary type conversions to and from UTC time.
Let me know if I can submit a pull request with the proposed Symbol conversion feature.
- duplicates
-
MONGOID-4913 StringifiedSymbol field to expose strings as symbols in Ruby
- Closed
- is related to
-
RUBY-2021 Ruby driver still uses deprecated symbol type
- Closed
-
MONGOID-4839 Add test coverage for symbol round-tripping in Hash field values
- Closed