I have read majority of the questions which quite havent helped me.
So I have three tables, User (parse Default), DataSet and Datapoint.
DataSet is linked to User based on Pointer.
Datapoint is linked to Dataset based on Pointer (object ID of DataSet).
I can easily load DataSets for each User Parse. What i would like to do is load datapoints for a dataset.
I am using Angular, and I can pass the dataset object to, and based of that ID I want to be able to get datapoints for that dataset.
He is what I have so far.
getmyDataPoint: function getMyDataPoint(dataset, callback) {
//get object ID of dataset
var datasetid = dataset.id;
var query = new Parse.Query(Datapoint);
query.include('inDataset');
//inDataset is column name that is pointer, linking to dataset.
query.EqualTo('inDataset', datasetid);
query.find({
success: function(results) {
callback(results);
alert("found some here " + results);
},
error: function(error) {
alert("Error: no datapoint found " + error.message);
}
});
As you would know this quite doesnt work. Any help?