-
Notifications
You must be signed in to change notification settings - Fork 67
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
Floating point number is saved as Number - both in code & MongoDb command #691
Comments
It's rather unlikely to happen. Neither MongoDB nor Astronomy would do that
as long as you're not doing something extra. Amount of info you've provided
is not sufficient to tell.
…On Sat, Nov 10, 2018, 7:50 AM Andreas West ***@***.*** wrote:
We have the same problem (as this one #575
<#575>), both within our
code:
return Gedmatches.insert({ kit1, kit2, totalCm, created, notSharing: true
});
and when using MongoDb insert directly:
db.gedmatches.insert({ kit1: 'SyVRzmvn4f', kit2: 'Syfq7mD3Nz', created:
new Date(), updatedAt: new Date(), totalCm: 7.32, HIR: 1 })
In both cases it changes the field value to 7 in the doc instead of 7.32
There must be an easier way to allow floating point numbers!
*Originally posted by @a4xrbj1 <https://github.com/a4xrbj1> in
https://github.com/jagi/meteor-astronomy/issue_comments#issuecomment-437563068
<https://github.com/jagi/meteor-astronomy/issue_comments#issuecomment-437563068>*
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#691>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABAKXU_2BmOwTMvv3ipYhEq6sQ5x3uxeks5utncugaJpZM4YX3DC>
.
|
What info do you need? The definition for this field is: totalCm: { |
You have to create reproduction repository. Without that it's hard to tell. When you will try to replicate this error on the smaller code base it will probably appear to be caused not by Astronomy but by something else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have the same problem (as this one #575), both within our code:
return Gedmatches.insert({ kit1, kit2, totalCm, created, notSharing: true });
and when using MongoDb insert directly:
db.gedmatches.insert({ kit1: 'SyVRzmvn4f', kit2: 'Syfq7mD3Nz', created: new Date(), updatedAt: new Date(), totalCm: 7.32, HIR: 1 })
In both cases it changes the field value to
7
in the doc instead of 7.32There must be an easier way to allow floating point numbers!
Originally posted by @a4xrbj1 in https://github.com/jagi/meteor-astronomy/issue_comments#issuecomment-437563068
The text was updated successfully, but these errors were encountered: