Author Topic: Named default value constraints  (Read 477 times)

jaimecerda

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Named default value constraints
« 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.
« Last Edit: September 15, 2018, 07:01:47 am by jaimecerda »

qwerty

  • EA Guru
  • *****
  • Posts: 10508
  • Karma: +232/-190
  • I'm no guru at all
    • View Profile
Re: Named default value constraints
« Reply #1 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.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6789
  • Karma: +63/-6
    • View Profile
Re: Named default value constraints
« Reply #2 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.
Eve

support@sparxsystems.com

jaimecerda

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Named default value constraints
« Reply #3 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