Select to view content in your preferred language

Relationships not showing up in REST API

10427
21
03-31-2011 09:47 AM
AricMueller
Deactivated User
We have ArcGIS Server 10.0 sp1 running on Windows (behavior exhibited in 2003 and 2008x64).  The published MXD services have relates established in the MXD to Oracle tables.  The tables are access via Oracle authentication.  The related tables are not registered in the geodatabase or arcsde.  In most cases, the tables are public synonyms of objects in another schema.  The relates work fine in ArcMap but do not show up in the REST api once published.  No errors or warnings are logged.  Relates established to other featureclasses do show up.  The behavior seems inconsistent as we have XP workstations with the exact same build of desktop and server which can make a relate to unregistered tables in another Oracle instance.  Can anyone provide any insight on whether this is expected behavior?  In other words, shouldn't any relationship (explicitly established as a relate in ArcMap) be visible to the REST api as long as there are no permissions issues (which there are not here)?
0 Kudos
21 Replies
AricMueller
Deactivated User
That is the bug!  I'm surprised it's not a bigger issue withing the AGS community but thank you all for taking the time to respond.  This is actually a pretty big deal for our clients because I'm having to create spatial views all over the place (rather than ArcMap joins).  There are obviously potential upsides to the spatial view approach but it significantly complicates system maintenance.  Thank you forum community!
0 Kudos
ar4
by
Emerging Contributor
@Chris

Did they mention if the real bug might be the fact that the log did not actual reflect the design?

ie If Arcmap joins are not supported then why does the log not say " Layer X contains unsupported joins" or something similar.

The fact this does not happen is a bug IMO.
0 Kudos
ChrisBeaudette
Frequent Contributor
@Chris

Did they mention if the real bug might be the fact that the log did not actual reflect the design?

ie If Arcmap joins are not supported then why does the log not say " Layer X contains unsupported joins" or something similar.


No, ESRI Support did not mention that this is considered a bug in logging.
0 Kudos
JohnLove
Deactivated User
I am experiancing the same issue with one very important difference. I am running SQL Server 2008 64 bit and creating spatial views using sde commands is not supported (see SDE documentation page ArcGIS\ArcSDE\Documentation\Admin_Cmd_Ref\Support_files\admincmdref.htm ) so, if developing a web mapping solution using the ArcGIS API for silverlight (uses REST), it is not possible to display data unless it is in one big gigantic feature class containing all of the attributes that you might want to associate with a feature.



Is this by design? If so, I think it is a terrible design!
0 Kudos
Mohammad_AgusSalim
Emerging Contributor
I have the same problem and I'm confused why ESRI consider this as by design? its definitely a bug. Attribute of related layer can be retrieved in REST map service but why it cannot be retrieved from feature service? Anyone has a workaround on this? If not, means that I have to put the table that shared among other features on each feature layer then. Everything will be duplicated, hard to maintain and there is no point of using geodatabase. This is really bad design.
0 Kudos
KathrynJones
Emerging Contributor
Thanks so much for this thread. I was tearing my hair out trying to work out why my relationship wasn't showing up in my REST end point. After reading this, I simply added the related tables to my MXD and re-published to server, and now the relationship is visible. Thank you!
0 Kudos
JasonSweet
Emerging Contributor
I'm displaying features based on an attribute stored in a related table, using a join to accomplish that.  I can view the table that is joined, but not tables related to that joined table.  Same issue?  If so, I'm thinking I'll duplicate the feature classes and related tables in the table of contents using the join for the symbology, group the orginals together and give the group whatever name, then use the duplicates (transparent) for the Identify, Query, whatever.  Innefficent, but might be a workaround?
0 Kudos
JasonSweet
Emerging Contributor
No go.  Removed the joins to see if I could see the related to related tables in the service, nope.
0 Kudos
LukeBehling
Frequent Contributor
There is an idea on ArcGIS Ideas that is related to this problem. I've experienced the same thing. This is something should just work, without a series of complex workarounds.

Title : REST API - relationships missing originPrimaryKey, destinationPrimaryKey, ... and the link is :   http://ideas.arcgis.com/ideaView?id=087300000008FVF
0 Kudos
GaryMacDougall
Esri Contributor
In 10.0 attribute relationship classes are not supported with feature services. In 10.1, we have added support. To include the attributed relationship class with your service make sure to add it to the map before publishing. The layer and table resources in REST also include information about the relationship classes including the primary and foreign keys as well as the cardinality.

thanks
Gary
0 Kudos