LinqConnect/sqlite doesnt allow unique columns?

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
EricPeterson
Posts: 2
Joined: Sun 12 Jun 2011 07:14

LinqConnect/sqlite doesnt allow unique columns?

Post by EricPeterson » Sun 12 Jun 2011 14:30

Hello

I just installed linqconnect trial and i have it manipulating my database already.

Am i missing something or is there no way to have linqconnect generate a sqlite database that supports unique columns? I do not see an option in the properties dialog for a column and putting UNIQUE in the TEXT NOT NULL field doesnt do anything.

i see when i browse the data in the database explorer and when i click on the column in question I see a 'unique' boolean field, but it is disabled and always set to false.

I know i can always check to see if a row exists via linq first via a select statement, but i want the database to enforce the uniqueness as well.

I know sqlite supports unique column constraints, but is this kind of database design something i have to to in Entity Developer outside the VS IDE?

Thanks!

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 14 Jun 2011 15:52

Since LinqConnect does not enforce unique constraints on its own (i.e., uniqueness is checked at the database side only), no information about unique columns is included to the mapping. However, we will consider adding this information to the mapping in future for the purpose of creating databases from models.

At the moment, you can enforce these constraints, e.g., by executing the corresponding SQL via the SQLiteCommand class.

Post Reply