My favorites | Sign in
Logo
    
New issue | Search
for
| Advanced search | Search tips
Issue 67: IsDeleted field cause Incorrect syntax near the keyword 'WHERE'
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by anuradha.jayasena, Apr 22, 2009
What steps will reproduce the problem?
1.Include 2.2 dll to the project (VS 2008 - C#) and Copy new Substage
2.Generate DAL Classes using database with "IsDeleted" field in each Table
3.When I run "FetchByID" which has 
  "ProductCollection coll = new ProductCollection().Where("Id", Id).Load
();"

What is the expected output? What do you see instead?
expected output is getting the Collection without error, but it provides 
Incorrect syntax near the keyword 'WHERE'. , query is something like
"SELECT TOP 100 PERCENT  [dbo].[Products].[Id], [dbo].[Products].[Name], 
[dbo].[Products].[Description], [dbo].[Products].[ProductKey], [dbo].
[Products].[IsDeleted], [dbo].[Products].[CreatedOn], [dbo].[Products].
[CreatedBy], [dbo].[Products].[ModifiedOn], [dbo].[Products].[ModifiedBy] 
FROM [dbo].[Products] 
--WHERE [dbo].[Products].[Id] IS  NULL 
WHERE (IsDeleted IS NULL OR IsDeleted = 0) ORDER BY [Id] ASC;"

What version of the product are you using? On what operating system?
version 2.2

Northwind Unit Test to verify the problem:

I have earlier mistakenly named field as "IsDeletd" after sometime i have 
changed it to "IsDeleted" then this started and i have changed the 
version  2.2 to solve the problem... but it didint work
Incorrect syntax near the keyword 'WHERE'.mht
12.2 KB   Download
Sign in to add a comment

Hosted by Google Code