Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revEng does not support Pure Join Tables (PJTs) #3352

Closed
chriskinsella opened this issue Oct 6, 2015 · 1 comment
Closed

revEng does not support Pure Join Tables (PJTs) #3352

chriskinsella opened this issue Oct 6, 2015 · 1 comment

Comments

@chriskinsella
Copy link

EF 7.0.0-beta7 revEng does not seem to support Pure Join Tables (PFJs).

EF6 does reverse engineer PJTs. In doing so EF6 does not include the entity class of the PJT itself, instead placing collections directly in each of the entities joined by the PJT. ref https://msdn.microsoft.com/en-us/library/vstudio/dd742359(v=vs.100).aspx

My PJTs have only two foreign keys and a UNIQUE CLUSTERED constraint (clustered constraint to satisfy Azure SQL db requirement).

EF7 does not support creation of an entity class for a table without a primary key, so an entity class for the PJT itself will not be created either. The following comment is place in the corresponding PJT entity class file -
"// Unable to generate EntityType EntityA_EntityB. Unable to identify any primary key columns in the underlying SQL Server table [dbo].[EntityA_EntityB]."

Am I missing something? I googled and googled to no avail. Will this PJT feature be in EF7? Certainly seems like an ante for any ORM tool.

Thanks

@lajones
Copy link
Contributor

lajones commented Oct 6, 2015

Many-to-many without the intermediate join table is not supported by the first stable release of EF7. We do allow many-to-many but only if you include the intermediate table as an entity - and that adds the requirement that it have a primary key. We are tracking this with #1368. So closing this as a dupe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants