SQL script for created VIEW in database wrong?

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Peter Kuhn
Posts: 1
Joined: Wed 06 Jul 2011 15:01

SQL script for created VIEW in database wrong?

Post by Peter Kuhn » Wed 06 Jul 2011 15:24


I created a simple database (SQLite) with a Table and a View. For the View I used the following script:

Code: Select all

CREATE VIEW ProductSlim AS  
SELECT ID, Name FROM Product
If I import my database, I can see the table and the view in the “Database Explorer” which is separated in two categories:
Database Connection --> main --> Tables --> Product
Database Connection --> main --> Views --> ProductSlim

If I try the function “Generate Database Script From Model” I see that my View is converted to a table:

Code: Select all

-- Creating a table "main".ProductSlim
CREATE TABLE "main".ProductSlim (
   Name TEXT
Is there any possibility to avoid this conversion?

Peter Kuhn

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 07 Jul 2011 09:37

Unfortunately, the model does not contain the information that is necessary for the view script generation (namely, we don't have any information about the table(s) the SELECT statement is applied to).

Post Reply