I did a little more playing around. Discovered and verified a few different
things. First, I recall reading somewhere that the type mapping is being
cached (I think I read that). So when I played around with the JSON payload
being sent in I started to get mixed results and what was previously not
t
Thanks for confirming. I tested the logic and while there are no errors, the
value of the /time /property is being persisted as /null /in Mongo. I am
going to take a look at the converter classes to see if I can figure out how
that is possible. Any thoughts?
Again, thanks for the help on this!
Yeah. Converting the body to a String is a good way to guarantee that the
conversion logic we're interested in will kick in.
Just for reference, have a look at the MongoDbConverters class.
Cheers,
Raúl.
On 14 Mar 2016 18:52, "gramanero" wrote:
> Yes I can try that. To make sure I am on the same
Yes I can try that. To make sure I am on the same page is this what you are
asking for?
*Route:*
/
/
*JSON to send:*
/{ "time" : { "$date" : "2016-02-19T17:37:57.673+" } }/
Or do think we should not perform the convertBodyTo string?
Thank you for the quick response! I seriously appre
Jackson is not MongoDB-specific and therefore doesn't recognise $date types.
The camel-mongodb component uses MongoDB's JSON class to parse Strings,
which does recognise Mongo-specific types:
http://api.mongodb.org/java/2.6.5/com/mongodb/util/JSON.html.
Can you try sending the JSON string directl
Any thoughts on my last post as to how we can use ISODates with camel-mongo?
Thanks!
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-insert-Date-String-as-date-in-MongoDB-tp5778310p5779035.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Thank you for the response and information. I believe I tried what is
recommended in the link that you provided. Below is a copy from the Logs via
the Karaf console. I hope the formatting is not too terrible. I can try and
provide it another way if necessary.
Pretty much the same result as I was s
MongoDB uses a special representation of JSON they call BSON.
According to their docs, timestamps should be represented with the
$timestamp token, along with 't' and 'i' portions for them to be
interpreted correctly by the drivers:
https://docs.mongodb.org/manual/reference/mongodb-extended-json/#t
I would be interested in knowing the answer on how to do this as well. I
posted in a different thread and the datatype I am trying to do this with is
the ISODate built-in mongo type. I am using Spring DSL as well. Thanks!
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to
Apologies for delayed response! can u try having it as Date instead of
String?
Regards,
-Yogesh
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-insert-Date-String-as-date-in-MongoDB-tp5778310p5778457.html
Sent from the Camel - Users mailing list archive at Nabble.com
It is of type string
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-insert-Date-String-as-date-in-MongoDB-tp5778310p5778407.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Hi,
What datatype is CreatedDateTimeUTC after it is converted using
.convertBodyTo(DBObject.class)
Regards,
-Yogesh
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-insert-Date-String-as-date-in-MongoDB-tp5778310p5778385.html
Sent from the Camel - Users mailing list
12 matches
Mail list logo