-
Notifications
You must be signed in to change notification settings - Fork 495
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
Bug - Handle java.util.Date datatypes in Mongodb procedures #520
Comments
The problem is that those problematic types can be at any level in the document, also packed or nested in arrays or nested maps. This problem also only occurs if we want to return exactly those fields via bolt or if we want to store them in properties in the db unconverted. So whoever knows which fields are there, can use any of the convert methods to turn them into other types (e.g. apoc.convert.toString) or just skip them as needed. So we would need to traverse every document that we get and check every value if it is potentially offending, which could be quite expensive. Currenly we only do it explicitely for the top-level objectId. We could add an optional flag to the procedures that reads |
@jexp if we do something like that |
Yep, but only if an optional flag is passed, that triggers the conversion. We have to watch out though for LONG values that perhaps can't be represented in JSON, at least test that it works. |
@jexp LONG values are converted to INTEGER if the number fits in an INTEGER, this is the default behaviour. |
We're seeing errors when attempting to get a Mongodb document with a java.util.Date datatype.
An example of usage and errors:
Error encountered is:
"Unpackable value Sat Apr 30 12:27:12 UTC 2016 of type java.util.Date"
This looks similar to an error in a previous mongodb issue, #355 , so we may need to follow the same steps, as the Neo4jPacker doesn't seem to be handling this type correctly. Seems like we'll need to transform this into a Long timestamp.
The text was updated successfully, but these errors were encountered: