Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Server Code and Pointers Error

Sorry Katya, but did you read the error at all ?

pre Error: '_id' is missing for pointer column 'groupType ( @ 66 : 18 ) - throw e/pre

The error is about the pointer column of the collection groups, and the fact its missing the _id. Using this in the app works perfectly, but for some reason its not working in server code. 'groupType' is sent via the app and sent to the server code service under the name 'groupTypeID'. Which is shown its sending it in console.log, and moved to 'group_type_id'.

I honestly do not understand your post at all, or how it could help fix this error!?!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Server Code and Pointers Error

Addy,

Could you please share your app and Database?

Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Server Code and Pointers Error

app is already shared as is the database, urVoice and urVoice 3 respectively :)

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Server Code and Pointers Error

Addy,

What service should we test, with what data?

Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Server Code and Pointers Error

This is the service: urv_NewGroupAction which is fired on the page createGroup4 once the paypal payment is taken.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Server Code and Pointers Error

Hi Addy,

1) You use method post in service while expect get in servercode. You would need to set get in service settings.
2) Remove extra request parameters of this service (data and Content-Type)
3) Add data for the following functions:
// Create User to Groups
// update Group
As you will get this error otherwise: "Error: Empty objects can't be created. Please specify at least one field."

Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Server Code and Pointers Error

I use server code a fair bit, and most of the time they are POST and all of those times the request.get works fine. So I am a little confused as to why it would cause an issue this time.

Removing the data and content-type is ok, but what do you mean Add data for the following functions. Data is added, so not sure I follow ?

Thanks

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Server Code and Pointers Error

Addy,

1) You can also use post, but then replace prerequest.get('groupTypeID');/preWith:prerequest.object().groupTypeID;/pre
2) Adding an object to collection 'group_owners' works and to 'users_groups' doesn't work because the first one has fields of string type and the second one has fields of pointer type that should be added in another way:
http://devcenter.appery.io/documentat...

3) There is a column 'users_id' in collection 'users_groups', while you use 'user_id' in code.

Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Server Code and Pointers Error

I understand, but I did not go past the first 'Create Group' yet, as that was what the error was about. I shall try the request.object() :)

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Server Code and Pointers Error

Hello,

Did you get it working?

Return to “Issues”