I am still trying to get spans to work correctly. If I put a QuerySpan in that does not exist I get nothing. But, If I put one that does, and is webvisable, I get the following error:
{"The specified type was not recognized: name='ParentOf', namespace='http://ideablade.com/PersistenceWebService/Types/', at <ChildOf xmlns='http://ideablade.com/PersistenceWebService/Types/'>."}
The Entity Organization is a Web Method the Relation Property is WebServiceVisable.
If the span returns no values it passes. If the the span has values it throws the error.
Code: (Notice I am not reference ChildOf as it does in the error)
Query aQuery = new Query();
QueryClause aClause = new QueryClause();
aClause.ColumnName = "Name";
aClause.ColumnValue = "Oregon Cities";
aClause.Operator = QueryOp.EQ;
QuerySpan mOrgOrgGroupSpan = new QuerySpan();
mOrgOrgGroupSpan.Relations = new string[] { "ParentOf" };
aQuery.Spans = new QuerySpan[] { mOrgOrgGroupSpan };
aQuery.Expressions = new QueryExpression[] { aClause };
Organization[] mOrgs = mWebService.GetOrganizations(aQuery, String.Empty);