expand expand expand

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
estern
Posts: 19
Joined: Tue 27 Jan 2009 18:59

expand expand expand

Post by estern » Tue 05 May 2009 11:47

This linq statement in Silverlight 2

Dim query = From p In myContext.WORKAREA_EMPLOYEE.Expand("EMPLOYEE").Expand("EMPLOYEE/SITELINK").Expand("EMPLOYEE/SITELINK/TRADE") _
Select p

Almost works. The ("EMPLOYEE/SITELINK/TRADE") does not work. The Trade object is nothing.

First is this a Microsoft issue or a Devarts issue? If it's a Devarts issue is there a way to get from table1 to table4 (workarea_employee, employee, siltelink, trade)

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 06 May 2009 10:26

Could you please send us (suport * devart * com, subject "Silverlight Expand()") a small test project illustrating the problem?

estern
Posts: 19
Joined: Tue 27 Jan 2009 18:59

Source and sql scripts have been sent to support@devarts.com

Post by estern » Mon 11 May 2009 03:05

the problem can be demonstrated with 3 tables

CREATE TABLE ES.A2
( "OI" NUMBER(11,0) NOT NULL ENABLE,
CONSTRAINT "A2_PK" PRIMARY KEY ("OI"));

CREATE TABLE ES.C2
( "OI" NUMBER(11,0) NOT NULL ENABLE,
"C2_DATA" VARCHAR2(10),
CONSTRAINT "C2_PK" PRIMARY KEY ("OI"));

CREATE TABLE ES.B2
("OI" NUMBER(11,0) NOT NULL ENABLE,
"OI_A2" NUMBER(11,0),
"OI_C2" NUMBER(11,0),
CONSTRAINT "B2_PK" PRIMARY KEY ("OI"),
CONSTRAINT FK_A2 FOREIGN KEY (OI_A2)
REFERENCES ES.A2 (OI),
CONSTRAINT FK_C2 FOREIGN KEY (OI_C2)
REFERENCES ES.C2 (OI));

The model looks correct

a2 is connected to b2 which is connect to c2

I can write, compile and execute this LINQ statement

Dim qA2B2C2 As Linq.IOrderedQueryable(Of A2)

qA2B2C2 = From A2B2C2 In m_ADOEntities.A2.Expand("B2").Expand("B2/C2") _
Where A2B2C2.OI = 1 Select A2B2C2



But get errors when trying to access data in C2

Post Reply