Book a Demo

Author Topic: Connector end detection during transformation  (Read 3685 times)

cpelster

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Connector end detection during transformation
« on: March 15, 2007, 06:07:37 am »
Hi there,

i have a class with a connection to itself. during the template the connection template is called twice for
beginning (source) and end (destination). Is there any chance to know whether i'm at the beginning ot the end?

in my exmaple I want to insert a primary key when the class references itself and the key gets insertet two times.


thanks in advance,


  christian

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8090
  • Karma: +118/-20
    • View Profile
Re: Connector end detection during transformation
« Reply #1 on: March 15, 2007, 12:59:26 pm »
Add something like this the following to the top of your connector template.

Code: [Select]
%if connectorSourceElemGuid != classGuid%
%endTemplate%

cpelster

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Connector end detection during transformation
« Reply #2 on: March 15, 2007, 11:57:29 pm »
Quote
Add something like this the following to the top of your connector template.

Code: [Select]
%if connectorSourceElemGuid != classGuid%
%endTemplate%


Hi Simonm,

i tried it, but it never gets called.
Correct me if I'm wrong but when the class references itself connectorSourceElemGuid and connectorDestElemGuid always are the same as classGuid?

Thanks,

  Christian

BGA

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Connector end detection during transformation
« Reply #3 on: March 20, 2007, 06:08:31 am »
The same "error" occurs in the DDL transfomation. When you have an association to a class itselft, you can see the ForeignKey statement twice in the intermediary file. But it appers only one attribute in the table ... so the error doesn't appear in the resulting table :). In a class to class transformation the attribute appears twice :(

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Connector end detection during transformation
« Reply #4 on: March 20, 2007, 05:58:37 pm »
Please report this as a bug to Sparx directly. This is a user forum, and though Sparx faithfully monitors things can fall through. Bug reports go directly into the Sparx 'hopper' and get the attention they deserve.

Follow the Support link at the top of the forum page, then click Bug Report in the left side menu. Or from the EA main menu choose Help | On-line Resources | Bug Report Page.
No, you can't have it!

doctor_uv

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Connector end detection during transformation
« Reply #5 on: May 25, 2007, 11:17:01 pm »
Did you find a solution to the self reference in the meanwhile? I hit the same problem.
Thanks for sharing the solution (if there is one) ;-)
Dr. UV
Software Architect
Alcatel-Lucent IPTV

cpelster

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Connector end detection during transformation
« Reply #6 on: May 26, 2007, 01:14:06 am »
Hi,

we solved the problem by writing our own more powerful transformation language as a plugin, but i think the problem was resolved by EA in build 605 or 606, i saw something concerning the connector ends in the changelogs.

regards,

  christian