Stratio / Spark-MongoDB

Spark library for easy MongoDB access
http://www.stratio.com
Apache License 2.0
307 stars 99 forks source link

ObjectId is converted to a string. #135

Open kshahbazk opened 8 years ago

kshahbazk commented 8 years ago

I am writing an application with this connector. What the application is doing is reading a collection in from MongoDB doing some analysis on the information, and writing it back into another collection. But since the ObjectID is converted to a string, it doesn't update the correct object and just creates a new object. Is there a way to retain the ObjectID without converting it to a string?

mafernandez-stratio commented 8 years ago

Hi @kshahbazk,

there is no way to do that at the moment but it seems an interesting feature for next releases. We also encourage you to participate in the implementation of this feature if you feel confident with the code.

Thanks for the suggestion.

joohnnie commented 8 years ago

Hi @kshahbazk, I faced the same issue and have a quick solution for this. But need to change the source code the Spark-MongoDB.

cperezmig commented 8 years ago

Hi, @joohnnie , could you explain your solution for the issue? Maybe I could help with the implementation.