Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Issue: EdmGen: Reverse engineering attached database fails [172]

$
0
0
"This is currently By Design. We may be able to do something better with either still creating a valid model or providing more helpful feedback.

[Steps]
1. Create a database project (using latest SQL Studio in Dev11) using the attached zip file
2. Publish the database project to a sql server
3. Create a c# “Web Application” project
4. Add a new ADO.NET Entity Data Model item based on database workflow and point to the above database created

[Expected result]
The data model is reverse engineered from the database

[Actual result]
The designer is empty because the reverse engineering process encountered an error ""The table 'AdvWorksSalome.Production.Document' is referenced by a relationship, but cannot be found.""

Note however that the database is a good one, and the error is not expected.

When using edmgen, you get the below output.
C:\Program Files\Microsoft Visual Studio 11.0\VC>EdmGen /mode:FullGeneration /project:NorthWind /provider:System.Data.SqlClient /connectionstring:""server=datatoolshost\sql2008;database=AdvWorksSalome;integrated security=True;"" /targetversion:4.5
EdmGen for Microsoft (R) .NET Framework version 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
Loading database information...
warning 6005: The data type 'hierarchyid' is currently not supported for the target .NET Framework version; the column 'OrganizationNode' in table 'AdvWorksSalome.HumanResources.Employee' was excluded.
warning 6005: The data type 'hierarchyid' is currently not supported for the target .NET Framework version; the column 'DocumentNode' in table 'AdvWorksSalome.Production.Document' was excluded.
warning 6031: The column 'DocumentNode' on the table/view 'AdvWorksSalome.Production.Document' was excluded, and is a key column. The table/view has been excluded. Please fix the entity in the schema file, and uncomment.
warning 6005: The data type 'hierarchyid' is currently not supported for the target .NET Framework version; the column 'DocumentNode' in table 'AdvWorksSalome.Production.ProductDocument' was excluded.
warning 6031: The column 'DocumentNode' on the table/view 'AdvWorksSalome.Production.ProductDocument' was excluded, and is a key column. The remaining key(s) were used and table/view has been created as read-only.
warning 6002: The table/view 'AdvWorksSalome.dbo.CustomerSegmentView' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.HumanResources.vEmployee' does nothave a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.HumanResources.vEmployeeDepartment' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.HumanResources.vEmployeeDepartmentHistory' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.HumanResources.vJobCandidate' doesnot have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.HumanResources.vJobCandidateEducation' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.HumanResources.vJobCandidateEmployment' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Person.vAdditionalContactInfo' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Person.vStateProvinceCountryRegion' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Production.vProductAndDescription'does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Production.vProductModelCatalogDescription' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Production.vProductModelInstructions' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Purchasing.vVendorWithAddresses' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Purchasing.vVendorWithContacts' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Sales.vIndividualCustomer' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Sales.vPersonDemographics' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Sales.vSalesPerson' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Sales.vSalesPersonSalesByFiscalYears' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Sales.vStoreWithAddresses' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Sales.vStoreWithContacts' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
warning 6002: The table/view 'AdvWorksSalome.Sales.vStoreWithDemographics' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
error 6004: The table 'AdvWorksSalome.Production.Document' is referenced by a relationship, but cannot be found.
warning 6005: The function 'uspUpdateEmployeeLogin' has a parameter 'OrganizationNode' at parameter index 1 that has a data type 'hierarchyid' which is currently not supported for the target .NET Framework version. The function was excluded.
Generation Complete -- 1 errors, 27 warnings
C:\Program Files\Microsoft Visual Studio 11.0\VC>
"

This item was migrated from the DevDiv work item tracking system [ID=344317].

Comments: Related work item: http://entityframework.codeplex.com/workitem/695

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>