MikaelEliasson / EntityFramework.Utilities

Provides extensions for EntityFramework that doesn't exist out of the box like delete and update by query and bulk inserts
443 stars 175 forks source link

Error generating Update Query for multicolumn Primary Key #46

Closed hanpera closed 9 years ago

hanpera commented 9 years ago

The Method UpdateAll on Table that have 2 columns Primary Key has generated a query like this:

UPDATE [StudyAssumption] SET [IsSponsor] = TEMP.[IsSponsor],[IsCromsource] = TEMP.[IsCromsource] FROM [StudyAssumption] ORIG INNER JOIN [temp_StudyAssumption_635693559224566926] TEMP ON ORIG.[IdStudy] = TEMP.[IdStudy], ORIG.[IdAssumptionType] = TEMP.[IdAssumptionType]

There is a "," instead an "AND in the ON Clause that results in a SQL Server error

MikaelEliasson commented 9 years ago

Fixed an released in 1.0.1

MikaelEliasson commented 9 years ago

Thank you for noticing this. Please tell me if the new version didn't fix the problem.