howto: Query one to many relationship

Discussion created by stalknecht on Jun 1, 2011
Latest reply on Jun 2, 2011 by stalknecht
See the folowing example. How do i get the valveID of a selected feature after an identify? and is the valveID meaning the OBjectsID?

//ID of the valve for which we want to find the related pipeline
NSNumber* valveID = ...;

AGSRelationshipQuery* relQuery = [AGSRelationshipQuery relationshipQuery];
relQuery.objectIds = [NSArray arrayWithObject: valveID];
relQuery.relationshipId = 0 ; //ID of 'Installed on' relationship

[queryTask executeWithRelationshipQuery: relQuery];