neisbut / EntityFramework.MemoryJoin

Extension for EntityFramework for joins to in-memory data
MIT License
56 stars 24 forks source link

Error: Invalid column name 'id' #1

Closed cjmairair closed 6 years ago

cjmairair commented 6 years ago

Using EF 6.1.3

I was just doing a basic join and I got that error. I investigated the problem and I can see that the EF generated a query which refers to the 'id' field of your fake query entity, but you didn't put that column in your table literal in the generated SQL code.

So, I changed MappingHelper so that the 'id' column is always generated in the SQL code (just with values of 1, 2, 3, 4, ...), and it works now.

neisbut commented 6 years ago

Hi @cjmairair, thanks for the feedback. I've added Id generation and published this change in 0.5.3. Please check if it works for you now. Thanks!

cjmairair commented 6 years ago

It works. Thanks.