We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
we are currently working on a project using Trackable Entities for EF v6. We are currently using 2.5.7 (newest version).
In this project, we have two tables that are related to each other. The Main table has a foreign key to a type table.
The type table has a primary key of 2 columns. Column 1 is smallint Columns 2 is nvarchar(5)
We used Trackable Entities to track this relation. When running LoadRelatedEntities in EF6, we encountered the following exception:
('TRAKT' is a value, not a column name!)
We stepped through the code in VS, and stepped inside Trackable Entities code. What we found is as follows:
The key that is NVARCHAR isn't surrounded with single quotation marks.
Then, inside GetWhereSql, it is inserted without quotation marks:
The where clause we end up with is then: WHERE (x.FirmaID = 10 AND x.KjoretoyType = TRAKT)
WHERE (x.FirmaID = 10 AND x.KjoretoyType = TRAKT)
when it should be: WHERE (x.FirmaID = 10 AND x.KjoretoyType = 'TRAKT')
WHERE (x.FirmaID = 10 AND x.KjoretoyType = 'TRAKT')
This leads to an exception as the SQL isn't correctly shaped.
Again, this happens when the newest version (2.5.7) is installed with Nuget.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
we are currently working on a project using Trackable Entities for EF v6. We are currently using 2.5.7 (newest version).
In this project, we have two tables that are related to each other. The Main table has a foreign key to a type table.
The type table has a primary key of 2 columns.
Column 1 is smallint
Columns 2 is nvarchar(5)
We used Trackable Entities to track this relation. When running LoadRelatedEntities in EF6, we encountered the following exception:
('TRAKT' is a value, not a column name!)
We stepped through the code in VS, and stepped inside Trackable Entities code. What we found is as follows:
The key that is NVARCHAR isn't surrounded with single quotation marks.
Then, inside GetWhereSql, it is inserted without quotation marks:
The where clause we end up with is then:
WHERE (x.FirmaID = 10 AND x.KjoretoyType = TRAKT)
when it should be:
WHERE (x.FirmaID = 10 AND x.KjoretoyType = 'TRAKT')
This leads to an exception as the SQL isn't correctly shaped.
Again, this happens when the newest version (2.5.7) is installed with Nuget.
The text was updated successfully, but these errors were encountered: