Page 1 of 1

How can I create a pointer type in the database?

Posted: Thu Mar 07, 2013 7:06 pm
by Bert De Coutere

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?


How can I create a pointer type in the database?

Posted: Thu Mar 07, 2013 7:51 pm
by maxkatz

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.


How can I create a pointer type in the database?

Posted: Fri Mar 08, 2013 12:20 am
by maxkatz

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"


How can I create a pointer type in the database?

Posted: Fri Mar 08, 2013 8:24 am
by Bert De Coutere

Yes, that worked! Thanks!


How can I create a pointer type in the database?

Posted: Mon Jul 20, 2020 11:10 am
by Bert De Coutere

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