Book a Demo

Author Topic: PK/FK stereotyped attributes in C# transformation?  (Read 3256 times)

Kaneda

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
PK/FK stereotyped attributes in C# transformation?
« on: July 27, 2005, 05:39:25 am »
Hi there,

I am still "playing around" with my PIM to PSM transformation. :)
I got some attributes marked with PK/FK (for the DDL transformation).

However, I added a stereotyped override to the C# Attribute template, amongst other things to keep my attributes in a struct public. But those marked with PK/FK still get changed to private during the transformation.
Shouldn't a stereotype like that be ignored during a C# transformation?

I looked through all the templates and couldn't find any hint why that happens. Is there sth. happening that can't be seen in the templates, or am I missing something?

Any Help is appreciated :)
There are 10 types of people in this world. Those who understand binaries and those who don't...

Kaneda

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: PK/FK stereotyped attributes in C# transformat
« Reply #1 on: July 29, 2005, 02:01:47 am »
Is this maybe something that is "hidden" in the CONVERT_TYPE funtion makro?

There are 10 types of people in this world. Those who understand binaries and those who don't...

Kaneda

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: PK/FK stereotyped attributes in C# transformat
« Reply #2 on: July 31, 2005, 07:31:52 am »
well it seems that any attribute that has a stereotype (at least those with PK/FK; unique and date) gets transformed into a private attribute in the PSM model.

Wonder why that is.
There are 10 types of people in this world. Those who understand binaries and those who don't...

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: PK/FK stereotyped attributes in C# transformat
« Reply #3 on: July 31, 2005, 03:35:23 pm »
Yes, any attribute that has a stereotype will be transformed, unless you specify in the transformation that it shouldn't be.

The CONVERT_TYPE macro doesn't do anything fancy.  All it does is look up the datatypes table in the database for a type that matches the generic type for the language specified.

Simon

Kaneda

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: PK/FK stereotyped attributes in C# transformat
« Reply #4 on: July 31, 2005, 11:18:51 pm »
well I did override the stereotype, but the attributes still ended up as private ones. Thats why I was wondering if there is sth. "hidden" somewhere.

Though, it is of course absolutly within the realm of high possibilities that my stereotype override wasn't working at all :)


Anyway, currently I removed all the stereotypes, for now...
« Last Edit: July 31, 2005, 11:19:46 pm by Kaneda »
There are 10 types of people in this world. Those who understand binaries and those who don't...