Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol type is deprecated #41

Open
jeremyhaile opened this issue Oct 7, 2016 · 3 comments
Open

Symbol type is deprecated #41

jeremyhaile opened this issue Oct 7, 2016 · 3 comments

Comments

@jeremyhaile
Copy link

jeremyhaile commented Oct 7, 2016

The "symbol" type is deprecated in BSON and in Mongo 3.2.
https://docs.mongodb.com/manual/reference/bson-types/

I believe mongoid-enum should be updated to use Strings instead of Symbols for storing the enum value to reduce future data migrations when Symbol is finally removed as a supported type.

Alternatively, mongoid-enum could be made to be indifferent as to whether strings or symbols are stored - including in the auto-generated accessor methods.

@jnfeinstein
Copy link

jnfeinstein commented Aug 16, 2017

+1

We're trying to upgrade mongo, the export utility flat out refuses to handle symbol types. Any plan to tackle this?

On second thought, shouldn't mongoid silently handle this under the hood? If it accepts Symbol as a type it should know to encode as string and decode as symbol.

@sujithsudarsanan
Copy link

+1
Is there any solution for now?

@jnfeinstein
Copy link

Some additional insight, apparently the symbol type was deprecated in the BSON driver (masked to string) and specifically undeprecated by the official Ruby mongodb driver. Mongoid relies on the driver which relies on BSON. IMO this is beyond the scope of this project but is certainly an issue for anybody using mongoid. I'm currently unable to post evidence but will do so ASAP unless someone beats me to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants