I have an issue when I use the Evaluate method with a QueryDef with joined tables or featureClass from a Feature Layer.
Everything works great when I use this code with a GDB or an SDE connection, but it doesn't work with a Feature Layer from ArcGIS Enterprise.
https://myserver.com/server/rest/services/myweblayer/FeatureServer
The connection to this Feature Layer works when I use a simple QueryFilter.
Here is a simplified version of my code :
using (Table oTable1 = oGeodatabase.OpenDataset<Table>(oTableDefinition.GetName()))
using (FeatureClass oFeatureClass = oGeodatabase.OpenDataset<FeatureClass>(oFeatureClassDefinition.GetName()))
{
sTables = string.Format("{0} LEFT JOIN {1} ON {1}.MY_KEY = {0}.MY_KEY", oTable1.GetName(), oFeatureClass2.GetName());
oQueryDef = new QueryDef
{
Tables = sTables,
SubFields = sSubFields,
WhereClause = sWhere,
};
using (RowCursor oRowCursor = oGeodatabase.Evaluate(oQueryDef, false))
{
}
}
My Feature Layer is on ArcGIS Enterprise but it might be the same for ArcGIS Online.