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

ObjectId Representation #123

Open
ThisThatBC opened this issue Jun 9, 2014 · 1 comment
Open

ObjectId Representation #123

ThisThatBC opened this issue Jun 9, 2014 · 1 comment

Comments

@ThisThatBC
Copy link

Hi,

I need to convert the ObjectId data type to a string in Javascript. I found a Javascript class to help me do this but it is expecting the ObjectId in the following format:

time
machine
pid
inc

However the current version of play-morphia produces:

_inc: 1378983320
_machine: 805577711
_new: false
_time: 1402325534

Is it possible to create the top listed format? The Java Driver documention says the 'new' flag will be removed in v3. It is confusing with these deprecated 3 parameter constructors as well.

@ThisThatBC
Copy link
Author

Ok, so the 3 parameter ObjectId will be replaced in v3 of the Java driver with the current representation. I need the string representation of the ObjectId when 'renderJSON' is called in Play. How can I do this? You have something in ObjectIdGsonAdapter.java.

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

1 participant