Book a Demo

Author Topic: Generate DDLScript from Inherited Classes  (Read 5659 times)

pegah

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Generate DDLScript from Inherited Classes
« on: May 30, 2007, 04:06:58 am »
 hi.

I Create a data model in EA and add classes with sterotype "table" and then i connect two of them with "Generalize Connector" . then I click "Generate DDL Script". But in my ddlscript  Child Table doesn't have a primary key field of Parent Table.




If EA can support Inheritance in Database?

thanks.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generate DDLScript from Inherited Classes
« Reply #1 on: May 30, 2007, 04:17:22 am »
EA looks for a Class element with a stereotype of «table», which it then processes. Your subtypes are likely not quite what EA is looking for, so it likely does not handle them.

This is not really an EA problem, being itself inherited from the underlying profile, which is not from Sparx.

As a workaround you should ensure that your subtypes have the «table» stereotype, if this is practical for your application. If that does not work you might have to create a metamodel, with a supporting add-in, or rework your idea.

OMG is working on a formal profile, but this might take a while. Whenever it does happen I suspect (without proof) that Sparx will move quickly to implement it.

I wish I could help you more, but at least this might tell you where to look next.

David
No, you can't have it!

thomaskilian

  • Guest
Re: Generate DDLScript from Inherited Classes
« Reply #2 on: May 30, 2007, 11:58:04 am »
Quote
...If EA can support Inheritance in Database?

thanks.

It could if you modify the transformation template. I did that for my own purpose making extensive use of the automation interface. Depending on what you want to do you can spend quite some time on that... It was fun, though.