Quantcast
Channel: EntityFramework Reverse POCO Code First Generator
Viewing all articles
Browse latest Browse all 1642

Commented Unassigned: Model classes not generated for table with only a composite key [141]

$
0
0
__Repro steps__:

1. Create a table that _only_ has two columns (type int) that are FKs to PKs in two other tables.

1. Create a primary composite key from the two columns and have EF Reverse POCO regenerate the model for the DB. In my case, this is a XREF <cross-reference> type of table - so nothing else other than the two columns is needed.

__Result__: no model class generated for the table.


__Modification/workaround__: add another column (not in the composite key) to the table (e.g.: a timestamp column). Regeneration now works fine and the model gets created as expected.
(Also, setting the primary key to only one of the two initial columns seems to solve the issue as well - however that's not really a fix).

__Note__: I've only tested this with Azure V12 SQL DBs.
Comments: Mea culpa, was not aware of that EF convention/functionality, thank for pointing that out Simon. It thus seems like it's indeed a feature, not a bug :). Case closed.

Viewing all articles
Browse latest Browse all 1642

Trending Articles



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