Book a Demo

Author Topic: Methods and operation : How to set column?  (Read 4254 times)

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Methods and operation : How to set column?
« on: August 13, 2009, 11:13:53 pm »
OK, I have figured out without problems how to set the behavior, pre and post conditions of a method via automation interface so I can set check constraints for the database tables.
Now the interesting part: How can I set the column property of a table operation which is normally accessed via the column tab?

This one seems to be missing from the API as well as from the template language. Without this triggers have to be manually set in the PSM which is a no-go.

Any ideas?

Oliver

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Methods and operation : How to set column?
« Reply #1 on: August 13, 2009, 11:37:23 pm »
Well, as usual David pointed me to the right direction in an old post...

Quote
Take a look at tagged values. Perhaps that's where they store the stuff.

I'll try to remember. Meanwhile perhaps someone knows where this stuff is.

He was almost correct: Columns are mapped as parameters for the function. One for each column included.
So if you have two columns A and B for a unique constraint method, two function parameters are created:
Parameter A with a type of the column of A and Parameter B with a type of the column of B.

Example:
Code: [Select]
The unique method constraint has column A of type INT, column B of type VARCHAR.
Result: Method m(A:INT, B:VARCHAR);
Hope that helps.

Oliver

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Methods and operation : How to set column?
« Reply #2 on: August 14, 2009, 09:26:28 pm »
Quite right Oliver!

Thanks for clarifying this. Since then - literally while answering a post related to data modeling in EA - I stumbled over my copy of the original source material. That has helped me remember why things in the profile work the way they do.

When this all seems arcane, remember that it is not Sparx who are 'doing this to' you. Sparx was implementing an idea from outside; at the time it was pretty much the only realistic metamodel for database design in UML. Since then the OMG has started a process to come up with something more robust and with wider coverage. That effort has been moving at glacial speed if at all. Perhaps it it ever finishes EA will adopt the resulting metamodel...
No, you can't have it!