How to let ArcGIS Server see relationship classes defined in a geodatabase

7326
6
09-26-2011 10:36 PM
StephenLead
Regular Contributor III
I have an ArcSDE geodatabase which contains multiple relationship classes.

If I add this layer to ArcMap, the relationship is automatically detected (eg, the Identify dialog allows me to view the related features).

However, if I publish this map document to ArcGIS Server, the REST endpoints for the layer don't show the relationship classes.

This sample REST directory does show the related data. How has this been set up?

Thanks,
Steve
Tags (2)
6 Replies
nicogis
MVP Frequent Contributor
what's the version of your arcgis server ?
0 Kudos
StephenLead
Regular Contributor III
Hi Domenico,

I'm using ArcGIS Server 10.

I've decided to try denormalizing the database to remove the relationships (should be faster) so I'm not so worried about this now.

Thanks,
Steve
0 Kudos
RayCarnes
Occasional Contributor II
You also need to add the tables the relationships are based on to your map before publishing, and make sure ArcGIS Server has permission to read them.
0 Kudos
Anas_HaniAL-Shamasneh
New Contributor

Hi

can you explain the step to do this plz

Best Regards,,,

0 Kudos
StephenLead
Regular Contributor III

Say you have FeatureClass1, which is connected via a relationship class to Table1. It's not enough to just add FeatureClass1 to the map - you also need to use the Add Data tool and add Table1 to ArcMap.

Then publish the map to ArcGIS Server, where both FeatureClass1 and Table1 will be served up. For example see the services at SanFrancisco/311Incidents (FeatureServer)  and note that both Layer and Table are included.

The sample at Query and edit related records | ArcGIS API for JavaScript 3.18  may also help.

StephenLead
Regular Contributor III
add the tables the relationships are based on to your map


Thanks Ray, that was the solution. Hope you're well!