Book a Demo

Author Topic: Using constraints instead of defaults w/data model  (Read 2651 times)

Andy Steinke

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Using constraints instead of defaults w/data model
« on: August 13, 2008, 07:40:24 am »
When using EA 7.0 with a SQL 2005 data model I cannot figure out how I can represent default column values as specifically named constraints, rather than letting the DDL generator simply use the default and not specify a name.  Unfortunately in our homegrown deployment system we require specifically named objects for everything, and this is the only piece I haven't been able to get EA to do for me.

I tried using different operations, but even the CHECK constraint put the word CHECK in the ALTER TABLE / ADD CONSTRAINT command, requiring manual intervention.  Could I create another operation based on the check constraint but somehow have the DDL generator not add the CHECK to the code, but keep the rest of it the same?

I tried browsing through and it seems as if one should be able to do this by modifying something, but admittedly I'm a pretty new user to EA.

Thanks!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Using constraints instead of defaults w/data m
« Reply #1 on: August 13, 2008, 09:15:56 pm »
Hi Andy,

My guess [note that word] is that you've hit one of the limits of how EA handles this.

But that's a guess only. I could be wrong. [If anyone has done this, please chime in.]

What I suggest you try in the meantime is this. Reverse engineer a small schema with this construct into EA. Then inspect the resulting model. In particular check constraints, stereotyped operations (where this kind of thing is often stored by EA), and tagged values (on either operations or attributes). If you find something then you should be able to duplicate the functionality.

And if you do get it solved, please post back and clue the rest of us in.

Sorry I couldn't be more helpful.

David
No, you can't have it!

Andy Steinke

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Using constraints instead of defaults w/data m
« Reply #2 on: August 15, 2008, 12:06:30 am »
I received a response from Sparx saying this was a limitation (but oft-requested!) of their system at present.

If I find some time I'll try poking around to see if I can emulate it, and if so I will definitely post how.

Thanks!