Book a Demo

Author Topic: Foreign key name truncated to 50 characters by MDA transformation  (Read 5047 times)

domblou

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Hi,

The foreign key name is truncated to 50 characters by MDA transformation when transforming to SQL Server 2008 which is well below the 128 character accepted the DBMS. I was wondering if there's a setting to avoid this or to set it longer than that.

Thanks for your help.

Dominic

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Foreign key name truncated to 50 characters by MDA transformation
« Reply #1 on: January 07, 2017, 03:51:52 am »
Most likely (means I don't know exactly) this is due to table column size restrictions in the EA database. There are quite some that have a "strange" limit. And 50 sounds like one I heard before. It might be possible to increase those sizes in the schema creation scripts/alter the sizes manually. People have done so with a couple of columns, but this is all on your own risk. There's no guarantee that it will work in all circumstances and Sparx will not support that officially. You might send a feature request, though.

q.

domblou

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Foreign key name truncated to 50 characters by MDA transformation
« Reply #2 on: January 07, 2017, 06:27:07 am »
Thanks for your quick answer.

If I understand you correctly, you're suggesting to increase EA internal column where this information is stored? What's stange is that I can enter a name longer than 50 using the UI. So I guess that the field containing this info is longer than 50.

Thanks again.

Dominic

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Foreign key name truncated to 50 characters by MDA transformation
« Reply #3 on: January 07, 2017, 06:43:11 am »
It might as well be a limitation with the transformation (I said, I'm not sure here). I do no longer use it since I found that using the API I can do much more fancy things. Wait over the weekend for a Sparxian or another wiser guy to respond. If nothing happens you could contact Sparx support via mail to see whether the come up with anything.

q.

domblou

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Foreign key name truncated to 50 characters by MDA transformation
« Reply #4 on: January 07, 2017, 07:33:30 am »
Ok, thanks. I'll wait the week-end.

I didn't know I could use the API to do this. Can you a suggestion on where I can start my journey of learning how to use the API in the meantime?  ;)

Best regards,

Dominic


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Foreign key name truncated to 50 characters by MDA transformation
« Reply #5 on: January 07, 2017, 08:22:01 am »
Sure, but I didn't mean that you call the API like "doTheTransform". It's like I write a script that takes some class or package (e.g. that provided by Repository.GetTreeSelectedObject()) and then start to parse the offered structure and do all those fancy things for a transformation. This way you can do context checks (connected classes), meta controls (via e.g. tagged values/stereotypes), plausibility/constraint checks and much more. EA's transformation keeps links from the transformed to the original elements which I never found helpful. Where I did a transform it was always for a new version, so I could create a new instance directly. The main advantage over the proprietary transformation script language from Sparx is that you can use your favorite language which behaves much more predictable (in your favorite domain). AND: you can debug the transformation, which is not just a single plus.

q.