In Desktop, we have created to layers from the same source feature class that are differentiated by definition queries. We then create a relationship class (in the map document) for both layers to a single table. This works great in desktop, but when we publish the map service to ArcGIS Server, one layer is assigned both relationships and the other has none. From what I can see, when the data is published to ArcGIS Server, the relationships are established on layer source name and ignore layer IDs or layer names.
In desktop:
- CasesActive (Case FC with def query)
- have inspections (relationship)
- CasesInactive (Case FC with def query)
- have inspections (relationship)
Published to AGS:
- CasesActive (Case FC with def query)
- have inspections (relationship)
- have inspections (relationship)
- CasesInactive (Case FC with def query)
Screenshot from AGS rest endpoint:

10.4.1 environment