so, i've recently switched from the railo mongodb extension to cfmongodb because i'm having problems with my data landing in a proper mongodb format. I'm working on a routine which will perform a CFQUERY against a VisualFoxPro ODBC connection(barf), then stash the records in mongodb. the mongodb data will later be consumed by a nodeJS app (mongoose odm + angularJS) .
two problems i'm having
1) i was setting _id to a particular field in my db, for example, the old db has a "drivernumber" field, so i was feeding that into _id because on the nodeJS side, mongoose ODM handles "joining" the data when needed. This field is essentially a string. Mongo's documentation seems to indicate anything is fine here, so long as its unique but you obviously loose the timestamp. It works in both the mongodb extension for railo and mongodb itself but throws an error "invalid objectID".. Is that something i can work around with some modification?
2) this is the big one for me. I'm taking the cfquery results, iterating, converting to a struct (queryRowToStruct), performing any modify operations and then stashing it in mongodb. I'm still getting string values for everything. This could be more of a product of the ODBC connection, as i'm seeing a format like {ts'......'} (odbcdatetime?) I've tried various javaCast and createObject(...javaDate..).init(mydate).. but its still landing as a string! further investigation indicates similar behavior is happening to ints as well.. Is it the fact that i'm converting to a struct? Also, can i feed a full query into some method in your wrapper?
any help would be great! i'm on the verge of just using epoch time, but i don't think that'll work quite right given the fact that it'd still be a string, mongo might not order it correctly..
--
You received this message because you are subscribed to the Google Groups "CFMongoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfmongodb+...@googlegroups.com.
To post to this group, send email to cfmo...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfmongodb.
For more options, visit https://groups.google.com/groups/opt_out.