Bert De Coutere
Posts: 0
Joined: Thu Mar 07, 2013 6:58 pm

How can I create a pointer type in the database?

I'm stuck. I created a collection that has a pointer to a user in the Users collection.

When I try to invoke the service to create a new row in that collection I get a 'DBSC241 error Pointer column value of field 'UserID' must be JSON object but has 'class java.lang.String'.
In Tiggzi builder I put in a JS in the data mapping to have this JSON style object :
"return '{"collName":"Users", "_id":"'+value+'"}';"
When I do the same via the test option in the service, it does work. What am I doing wrong?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How can I create a pointer type in the database?

Check in Chrome Dev. Tools (or Firebug), Network tab -- for the actual request that's being sent. If it works from test but fails from the page, most likely the syntax in request is not valid.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How can I create a pointer type in the database?

I'm not sure whether the "\" should be there. Try to set it up this way: a href=""http://docs.tiggzi.com/documentation/ap ... pt_mapping"" rel=""nofollow""http://docs.tiggzi.com/documentation/.../a"

Bert De Coutere
Posts: 0
Joined: Thu Mar 07, 2013 6:58 pm

How can I create a pointer type in the database?

Yes, that worked! Thanks!

Bert De Coutere
Posts: 0
Joined: Thu Mar 07, 2013 6:58 pm

How can I create a pointer type in the database?

\""_id\"":\""51055644e4b0e330589c5a37\""}""

Return to “Issues”