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

changes integers to doubles #35

Closed
heygambo opened this issue May 16, 2012 · 10 comments
Closed

changes integers to doubles #35

heygambo opened this issue May 16, 2012 · 10 comments

Comments

@heygambo
Copy link

Hi,

we had a problem with our application because we updated some documents using Mongohub :(
The problem is, that our app saves some attributes as Integers. It's very important to us, that they will be integers later.
When updating a document integers become doubles. Do you have an idea what we can do to change this?

best regards,
gambo

@jeromelebel
Copy link
Owner

If you have Xcode and you know how to compile mongohub, you can remove comments that I added in this commit : jeromelebel/MongoObjCDriver@ea50a65

The best solution would be to create an UI to edit a mongo document, value per value (like the plist editor in Xcode). I started to work on that, but I don't have enough time.

I think my commit was not very good. I will revert it this week-end, (again, if I find the time).

Sorry for the problem.

@jeromelebel
Copy link
Owner

Well, I just reverted myself the commit, so you just need to compile mongohub or wait for the software update.
ca7e717
jeromelebel/MongoObjCDriver@86c40c7

@heygambo
Copy link
Author

Thx for the hard work!

@jeromelebel
Copy link
Owner

You can try with : https://github.com/downloads/fotonauts/MongoHub-Mac/MongoHub%20Fix%20for%2024&35.zip

Now, when a document is opened to be edited, a integer will be displayed as an integer (like 1), and a float or a double will be displayed as float (like 1.00000). So when the document will be saved while parsing, "1" will be saved as a long, and "1.00000" will be saved as a double.

Unfortunately, since we edit documents as json, I need to parse text, and it's not easy to keep the exact same type (like integer/long, and float/double). I would need to do the document editor like the plist editor.

Let me know if this new version of MongoHub is enough for you.

@jeromelebel
Copy link
Owner

fixed in 2.4.19(93)

@heygambo
Copy link
Author

I'll test it :)

@heygambo
Copy link
Author

you are the coolest dude ever!

@jeromelebel
Copy link
Owner

Thanks :-) Were you able to update your app??? It doesn't work for me... (I think it's a problem on the github side to serve the update feed).

@jeromelebel
Copy link
Owner

I guess I can close that one?

@heygambo
Copy link
Author

yep

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