Fixed when I switched from the oriento query builder to this:
objKeys = _.keys(obj)
query = "INSERT INTO #{ newTable } (#{ objKeys.join(",") }) VALUES (#{
JSON.stringify(_.values(obj)).slice(1,-1) })"
db.query(query)
Posted but in oriento. Thanks!
On Saturday, June 28, 2014 5:22:29 AM UTC-4, Lvc@ wrote:
>
> Seems there is a value that cause a bad marshalling/unmarshalling. Can you
> find what's the field responsible for such exception?
>
> Lvc@
>
>
>
> On 27 June 2014 18:33, Garrett Gottlieb <[email protected]
> <javascript:>> wrote:
>
>> I'm using oriento to insert into my OrientDB database:
>>
>> db.insert().into('User').set(user).one()
>> .then (user) =>
>> created()
>> .error (e) =>
>> error "Error creating user #{ user["objectId"] }", {user:user,
>> error:e}
>>
>> And after 1868 rows, I got this error output (first the erroneous user
>> object, then the error object):
>>
>> > Error creating user T6bALDD7vf
>> >
>> {"user":{"settings":{"__type":"Pointer","className":"Settings","objectId":"L89RW0E7pB"},"acceptedTerms":true,"activitiesCount":1,"appFirstUseDate":{"__type":"Date","iso":"2014-03-21T09:46:14.669Z"},"bio":".","birthday":{"__type":"Date","iso":"1992-06-10T00:00:00.000Z"},"email":"
>> [email protected] <javascript:>
>> ","equipment":{"1":[6,100,105,107,4]},"followerCount":0,"followingCount":0,"gender":2,"goal":1,"height_unit":2,"height_val1":1,"height_val2":64,"kitchenSinkBadgesSeen":["activity","schedule","findfriends","log","share","workouts/today"],"lastVersionUsed":"2.4.2","level":2,"location":"Azerbaijan","numReferrals":0,"platform":2,"popularFeedLastReadAt":{"__type":"Date","iso":"2014-04-09T10:56:10.054Z"},"postCount":1,"seenHamburgerInstructions":true,"stream":"b","timezone":"Asia/Baku","unsubscribedFromWorkoutEmails":true,"username":"gulnara","website":"
>> google.com
>> ","weight":62,"weight_unit":2,"createdAt":"2014-03-21T09:48:34.152Z","updatedAt":"2014-04-09T10:57:24.883Z","objectId":"T6bALDD7vf","ACL":{"*":{"read":true},"T6bALDD7vf":{"read":true,"write":true}},"sessionToken":"jgaq50y07p07053h5f0x9gkt6"},"error":{"name":"OrientDB.RequestError","message":null,"data":{},"previous":[{"name":"OrientDB.RequestError","data":{}}],"id":1,"type":"java.lang.NumberFormatException","hasMore":0}}
>> > [0.013s]
>>
>> Any idea what it's referring to?
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.