This is a migrated thread and some comments may be shown as answers.

Unique key column

1 Answer 108 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adrian
Top achievements
Rank 2
Adrian asked on 11 Dec 2010, 12:32 PM
I have the next problem:
I have the domain model with 1 MetClass named Products
First meta property is ID - pk,Int32
Second meta property is want to be a ProductName data type String with constraint Unique
I can not do in this domain model to be unique property.
When I update database from model does not change the DDL to put this property column.
Do not know where I set this column as a unique

I use MSSQL Express R2

1 Answer, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 15 Dec 2010, 05:32 PM
Hello Neagoe,

 Unfortunately this is not currently supported. What you can do is save the ddl script we produce and manually add the Unique constraint. So for example if your script looks something like that:

CREATE TABLE Products
(
ID int IDENTITY,
ProductName  varchar(255) NOT NULL,
UNIQUE (ProductName )
)
Please find the necessary change highlighted in yellow.
Regards,
Petar
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Tags
Data Access Free Edition
Asked by
Adrian
Top achievements
Rank 2
Answers by
PetarP
Telerik team
Share this question
or