Print Page | Close Window

Errors compiling QueryExplorer Sample

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1008
Printed Date: 28-Apr-2026 at 12:13am


Topic: Errors compiling QueryExplorer Sample
Posted By: thecotton
Subject: Errors compiling QueryExplorer Sample
Date Posted: 27-Nov-2008 at 7:53pm
When I try to compile QueryExplorer sample, I get the following 5 errors:
Error 11005: ComplexType elements are not supported in the Entity Designer. D:\DevForce EF Samples\Learning Units\200 Intermediate\LINQ, Entity SQL, Deployment Tester\02 Tutorials\Query Explorer\CS\Completed_Pt1\NorthwindEFServer\NorthwindEFServer.edmx 10 7 NorthwindEFServer
Error 11009: Property 'Address' is not mapped. D:\DevForce EF Samples\Learning Units\200 Intermediate\LINQ, Entity SQL, Deployment Tester\02 Tutorials\Query Explorer\CS\Completed_Pt1\NorthwindEFServer\NorthwindEFServer.edmx 128 11 NorthwindEFServer
Error 11009: Property 'Address' is not mapped. D:\DevForce EF Samples\Learning Units\200 Intermediate\LINQ, Entity SQL, Deployment Tester\02 Tutorials\Query Explorer\CS\Completed_Pt1\NorthwindEFServer\NorthwindEFServer.edmx 159 11 NorthwindEFServer
Error 11012: Entity type 'OrderDetails' contains a condition on its primary key. Please remove the condition from the mapping. D:\DevForce EF Samples\Learning Units\200 Intermediate\LINQ, Entity SQL, Deployment Tester\02 Tutorials\Query Explorer\CS\Completed_Pt1\NorthwindEFServer\NorthwindEFServer.edmx 753 13 NorthwindEFServer
Error 11012: Entity type 'OrderDetails' contains a condition on its primary key. Please remove the condition from the mapping. D:\DevForce EF Samples\Learning Units\200 Intermediate\LINQ, Entity SQL, Deployment Tester\02 Tutorials\Query Explorer\CS\Completed_Pt1\NorthwindEFServer\NorthwindEFServer.edmx 788 13 NorthwindEFServer
Using DevForce EF V4.2.1.6, VS2008 SP1, and Framework 3.5 SP1.
 
Any ideas what is not installed correctly?



Replies:
Posted By: GregD
Date Posted: 01-Dec-2008 at 12:32pm
Those five errors result from design changes to the Entity Framework between beta 3 and the release version.
 
The first thing to know is that the QueryExplorer will run just fine even though these errors are generated. The .NET version of the Entity Data Model still compiles just fine.
 
Now for the gory details.
 
Regarding the errors referencing ComplexTypes and the Address Property (which is modelled as a ComplexType):
 
Although the EDM itself supports complex types, the EDM designer has never supported them. Previously this was accepted as a fact of life, but I guess Microsoft got the designer to the point where they felt people should be able to depend on it for serious work, so they started generating the compiler error about complex types.  This error was new with the release version.
 
Regarding the errors referencing the conditions on the OrderDetails primary key:
The referenced condition occurs on AssociationSetMappings between OrderDetails, and Order and Product, respectively. I don't really know details except that the statements that impose the conditions can re commented out without any apparent effect except to get rid of the error. I conclude that they were needed or at least considered appropriate by the compiler in earlier releases, but not any more.
 
Our original objective with the QueryExplorer was to use DevForceEF queries against exactly the same Entity Data Model provided by Microsoft - which objective we accomplished. Unfortunately, Microsoft never updated the NorthwindEF model to work without errors against the release version of EF, so we now have a choice between diverging from the Microsoft model, or using it with errors. For the moment we're doing the latter, but if they don't release something before too much longer we'll probably just try to produce a version of the same model that supports all (or as many as possible) of the queries defined in the Query Explorer, but doesn't generate errors and does display in the EDM designer.
 
Greg

 


Posted By: thecotton
Date Posted: 01-Dec-2008 at 1:47pm
Thanks, Greg. One good thing about us as software developers - we are flexible and can take those whips and chains with gusto. I don't envy you guys having to fight battles out on the cutting edge. It's tough enough with you as a buffer between me and Microsoft...



Print Page | Close Window