chansdad
Posts: 0
Joined: Wed Nov 20, 2013 7:40 pm

related collections reg

How to get related collections all in one db query ? Let us say I have a students collection and then another collection called class. _id of student collection is in the class collection as student_Id .
How do i go about running a query on class collection and include the sudent collection in the result.

Basically think of retrieving all the students in the class and their details ..

Appreciate your reply

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

related collections reg

Hello! Please take a look here http://docs.appery.io/documentation/b... (see Including_related_objects section)

chansdad
Posts: 0
Joined: Wed Nov 20, 2013 7:40 pm

related collections reg

Thanks .. I created a pointer column and was able to include the object int he query result

When i try to wire the liocal storage id into this pointer column , record is not being saved .

How do i get the id into this pointer column ? from a local storage .

Regards

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

related collections reg

Hello! Please show us exact steps you tried.

chansdad
Posts: 0
Joined: Wed Nov 20, 2013 7:40 pm

related collections reg

Please see the attached screenshot . i highlighed the pntr and when i remove that connection , record gets stored , when i have that connection record does not get stored and the the screen does not move to the next screen ..
Image

chansdad
Posts: 0
Joined: Wed Nov 20, 2013 7:40 pm

related collections reg

Never mind . I figured it out

var parmvalue = {"collName" : "linknext_userprofiles","id" : localStorage.getItem("linknextuserid")};
return parmvalue;

Interesintgly i did not have to again do a JSON.Stringify . Object could be passed in the request .

Return to “Issues”