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

Need a way to fill DynamicChoice variables when loading an object from Mongo #3

Open
Mardok opened this issue Nov 29, 2012 · 2 comments

Comments

@Mardok
Copy link
Contributor

Mardok commented Nov 29, 2012

Structs that have a DynamicChoice variable will not fill when loading from Mongo. I don't know if it has similar functionality with Choice variables.

Can Go-Start have some kind of functionality where if the struct's DynamicChoice variable is pre-filled with options before querying the database, it will match the index to the correct string when loading from Mongo?

@Mardok
Copy link
Contributor Author

Mardok commented Nov 29, 2012

The workaround I'm using right now is to make a struct of the same structure except the datatypes are primitives. Then directly call mgo to fill the workaround struct.

@ungerik
Copy link
Owner

ungerik commented Dec 2, 2012

Valid point. DynamicChoice is currently not marshal-able to/from mongo. I have always used it with custom code for setting and getting. I'll look into that.

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

2 participants