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

create_objectId #10

Closed
ArnaudParant opened this issue Nov 4, 2013 · 12 comments
Closed

create_objectId #10

ArnaudParant opened this issue Nov 4, 2013 · 12 comments
Assignees

Comments

@ArnaudParant
Copy link
Contributor

Hi,

I have a problem with create_objectId.
It is limited to 12 characters long.

In MongoDB documentation, it is well written than ObjectId is 12 bytes long, but when we go down, we can see that ObjectId is 24 characters long.
http://docs.mongodb.org/manual/reference/object-id/
It might be considered to Hexadecimal size : FF = 1 byte.

When I tried to put one of them "string id" in create_objectId "507f1f77bcf86cd799439011", it raised "Bson.Invalid_objectId"

Kind regards,
Arnaud Parant

@msimon
Copy link
Collaborator

msimon commented Nov 4, 2013

Hey Arnaud,
Thanks for the bug report. Did you manage to fix your issue ? If so can you send me a pull request ?
If not, I don't have times to fix any issues lately, at best I will try to correct that this upcoming weekend.

Cheers

@ghost ghost assigned msimon Nov 4, 2013
@MassD
Copy link
Owner

MassD commented Nov 4, 2013

I will fix it tonight

Xinuo

Sent from my iPhone

On 4 Nov 2013, at 21:29, Marc Simon notifications@github.com wrote:

Hey Arnaud,
Thanks for the bug report. Did you manage to fix your issue ? If so can you send me a pull request ?
If not, I don't have times to fix any issues lately, at best I will try to correct that this upcoming weekend.

Cheers


Reply to this email directly or view it on GitHub.

@MassD
Copy link
Owner

MassD commented Nov 5, 2013

The source bson.ml has been fixed and committed. If the value is 24 chars, then should consider it as a hex input, i.e., "99" -> '\153', every two char in the hex string should be converted to one char.

@msimon hope you could help me about other versioning, opam stuff. thanks

@msimon
Copy link
Collaborator

msimon commented Nov 5, 2013

Sure. No worries. I will do that tomorrow.

Marc Simon
+1 (650)318-1807
Software Engineer
On Nov 5, 2013 12:25 AM, "MassD" notifications@github.com wrote:

The source bson.ml has been fixed and committed. If the value is 24
chars, then should consider it as a hex input, i.e., "99" -> '\153', every
two char in the hex string should be converted to one char.

@msimon https://github.com/msimon hope you could help me about other
versioning, opam stuff. thanks


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-27754282
.

@MassD
Copy link
Owner

MassD commented Nov 5, 2013

@msimon thank you very much.

@ArnaudParant in the mean time, in case you need the fix now, you can pull as the fixed source file has been committed.

@msimon
Copy link
Collaborator

msimon commented Nov 5, 2013

Hey @MassD @ArnaudParant,
I just update the opam package. It should work, but I didn't test it yet (I don't have ocaml on my work computer....)

@ArnaudParant
Copy link
Contributor Author

Hi @MassD @msimon,

Thank you about this quick respond and fix.

I can try the opam package, but what is the source url to add the bson repo in opam ?
$ opam repository add opambson https://github.com/MassD/bson/ ?
This one obviously does not work.

@msimon
Copy link
Collaborator

msimon commented Nov 5, 2013

Here you go: opam repo add mongo-package git@github.com:MassD/mongo.git

I will try to push it to the official repo very soon.

Cheers

@MassD
Copy link
Owner

MassD commented Nov 5, 2013

should it be opam repo add mongo-package git@github.com:MassD/bson.git?

@msimon
Copy link
Collaborator

msimon commented Nov 5, 2013

No, I put the opam packages description for bson and mongo in the mongo repo. Not the smartest thing I agree, but it was suppose to be really temporary.

I'll try to fix that asap

@MassD
Copy link
Owner

MassD commented Nov 5, 2013

Thanks Marc.

Best Regards,

Dr. Xinuo Chen

On 5 November 2013 12:47, Marc Simon notifications@github.com wrote:

No, I put the opam packages description for bson and mongo in the mongo
repo. Not the smartest thing I agree, but it was suppose to be really
temporary.

I'll try to fix that asap


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-27769530
.

@ArnaudParant
Copy link
Contributor Author

The opam package works correclty.
And the bug is fixed too.

Thank you both again.

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