Here is the quick setup:
- desktop application (Windows forms application, running on XP, .NET 4.0) connected to WCF Data Service (using .NET 4.0, hosted on IIS 7.5)
- 3 tables: T1, T2, T3 (SQL Server 2008)
- T2 has FK that references T1
- T2 has FK that references T3
- in other words T2 breaks many-to-many between T1 and T3. In addition T2 has some additional columns (it is not pure "join" table).
We are trying to use the following expand:
...
from r in proxy.T1.Expand("T2/T3") where r.ID = 100
...
This expand returns different number of rows in T2 than expected.
If we do not include T3 like this:
...
from r in proxy.T1.Expand("T2") where r.ID = 100
...
we receive proper number of T2 rows back. Also, when we run SQL directly everything looks good.
{ }) on the editor toolbar to nicely format and syntax highlight it! - marc_s