3548

Retrieve Records from Quickblox API

Question:

I am using Quickblox SDK in my Application and designed Custom Objects in the Quickblox Admin panel.Here i am having some complex relationship between Custom Objects and not able to figure out how to retrieve the records using the Quickblox API.

Problem:

There are two tables 1.User 2.Group, i am successfully fetching all the groups created by a specific using by using parent_id key as mention in Quickblox API for maintaining relationships between tables.

I want to retrieve all the groups created by the user and also the groups in which the user is added as a member which are created by other Users.How can i solve this? In my group table i am having a column that is an array of userIds to represent all the group members.

Can anyone tell me how to resolve this.How i can query and retrieve.I am really poor at DB knowledge and moreover Quickblox is a having different approach in the DB Design.

Answer1:

NSMutableDictionary *getRequest = [NSMutableDictionary dictionary]; [getRequest setObject:user_id forKey:@“user_ids_column_name[in]"]; [getRequest setObject:user_id forKey:@"ParentID"]; QBRequestErrorBlock errorBlock = ^(QBResponse *response) { NSLog(@"error: %@", response.error); }; [QBRequest objectsWithClassName:@“Group” extendedRequest:getRequest successBlock:^(QBResponse *response, NSArray *objects, QBResponsePage *page){ NSLog(@"Success"); } errorBlock:errorBlock];

Recommend

  • cakephp model association/join with same table [closed]
  • override relationship behaviour in sqlalchemy
  • PostgreSQL: update with left outer self join ignored
  • Wiring top-level DAGs together
  • Unable to add the file iOS application bundle
  • What to do if “git push heroku master” failed?
  • How to issue a command that produces infinite output and return immediately
  • Aspect advising other aspects
  • Can't get LogCat (Alcatel OneTouch Evolve)
  • Defining variable by logical subseting on time interval in data.table
  • How read between delimiters in php DOM of a XML file?
  • Regex for incomplete lines within known start and end strings
  • Partial specialization of a class template in derived class affects base class
  • Heroku push rejected - Hartl's Rails 3.2 tutorial
  • Accessing Rows In A LINQ Result Without A Foreach Loop?
  • iText RadioGroup/RadioButtons across multiple PdfPCells
  • Invalid object name 'dbo.Item'
  • Jenkins: FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection
  • TextToSpeech.setEngineByPackageName() triggers NullPointerException
  • Not able to aggregate on nested fields in elasticsearch
  • Why value captured by reference in lambda is broken? [duplicate]
  • Read text file and split every line in MSBuild
  • How to make a tree having multiple type of nodes and each node can have multiple child nodes in java
  • Apache 2.4 and php-fpm does not trigger apache http basic auth for php pages
  • How to add a column to a Pandas dataframe made of arrays of the n-preceding values of another column
  • Incrementing object id automatically JS constructor (static method and variable)
  • Cassandra Data Model
  • Matrix multiplication with MKL
  • Unit Testing MVC Web Application in Visual Studio and Problem with QTAgent
  • Codeigniter doesn't let me update entry, because some fields must be unique
  • Free memory of cv::Mat loaded using FileStorage API
  • CSS Applying specific rule for a specific monitor resolution with only CSS is posible?
  • What are the advantages and disadvantages of reading an entire file into a single String as opposed
  • Why joiner is not used after Sequence generator or Update statergy
  • embed rChart in Markdown
  • unknown Exception android
  • Recursive/Hierarchical Query Using Postgres
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • UserPrincipal.Current returns apppool on IIS
  • Converting MP3 duration time