Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: jaimecerda on September 15, 2018, 06:59:47 am

Title: Named default value constraints
Post by: jaimecerda on September 15, 2018, 06:59:47 am
Hi I have a table in the database that was created with this script:

Code: [Select]
CREATE TABLE [dbo].[Catalog] (
    [RecID] INT            NOT NULL,
    [IsSpecial] BIT           CONSTRAINT [DF_Catalog_IsSpecial] DEFAULT ((0)) NOT NULL,
    [Name] VARCHAR (255) NOT NULL,
    CONSTRAINT [PK_RecID] PRIMARY KEY CLUSTERED ([RecID] ASC)
);
GO

Whe importing to Enterprise Architect the default value of column "IsSpecial" is setup as a column attribute.  In my case I want to have it declared as a constraint with name (as expressed in CONSTRAINT [DF_Catalog_IsSpecial] DEFAULT ((0)). )

Does anyone know how to make EA name a default value constraint?
Thanks.
Title: Re: Named default value constraints
Post by: qwerty on September 15, 2018, 08:50:53 am
There's probably no way. That part can not be configured. You might send a feature request, but I doubt you can hold your breath long enough.

q.
Title: Re: Named default value constraints
Post by: Eve on September 17, 2018, 09:18:17 am
Looks similar to the primary keys and uniqueness constraints etc that are modeled using a separate stereotyped operation.
Title: Re: Named default value constraints
Post by: jaimecerda on September 18, 2018, 12:31:30 am
Unfortunatly the Default contraint type is not listed in the types dropdown, so that's why I can't name the default contraint  :(

The only values listed in the contraint type are:
PK
index
FK
unique
check
trigger