Book a Demo

Author Topic: FK operation sometimes dissappears after saving  (Read 6161 times)

chrvi

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
  • There are so many hidden features...
    • View Profile
FK operation sometimes dissappears after saving
« on: October 22, 2007, 06:11:29 am »
Hi,

I've encountered a problem with saving my model after I created a foreign key. The FK operation is created correctly when I design a new foreign key. However, sometimes(unfortunately not always) when I save such a model (either by closing the diagram containing the newly created FK connector or by menu File / Save Project or by Window / Save All Modified) the automatically created FK operation is deleted. The connector on the diagram seems to be OK, nevertheless if I display the "Foreign keys" property there are no source columns mapped to target columns (although before saving the model the mapping was correct). I can neither find the FK operation in my table's operations.

Has anybody had the same problem? Don't you have any idea what can be wrong with my data (since most foreign keys are created correctly and remain correct after saving the model, while only few of them don't keep their FK operation after saving)?

Thanks,

Radek
« Last Edit: October 26, 2007, 01:01:41 am by chrvi »
Radek

MStaniszczak

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: FK operation sometimes dissappears after savin
« Reply #1 on: October 23, 2007, 02:05:46 pm »
I have this same problem. But I'm new Enterprise Architect user, so I still don't find any solutions :(

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: FK operation sometimes disappears after saving
« Reply #2 on: October 23, 2007, 04:17:09 pm »
Hi guys,

Which versions of EA are you running?  Also, is it just the content of the FK dialogs that disappears or the operation or both?

For a column to appear on the FK dialogs, certain prerequisites must be true...  I'm not sure exactly what they are, but when I've noticed certain columns AREN'T on the list it has seemed reasonable.  Thus, if in saving, these prerequisites are corrupted, then that could explain why the columns disappear from the list.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

MStaniszczak

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: FK operation sometimes dissappears after savin
« Reply #3 on: October 23, 2007, 10:50:10 pm »
Make tree tables.
First table with complex PK:
CREATE TABLE test (
   a_id INT,
   b_locale CHAR(5),
   #...
   PRIMARY KEY(a_id, b_locale)
);

and next two tables withs simple PK:
CREATE TABLE a (
   id INT PRIMARY KEY,
   #...
);

CREATE TABLE b (
   locale CHAR(5) PRIMARY KEY,
   #...
);

Now try make in table 'test' FOREIGN KEY to tables 'a' and
'b' in this way:

test.a_id=>a.id
test.b_locale=>b.locale

After that, try save project. On my EA (7.0 build 817 no Add-In) line of association beetwen tabels still exist but disappear one of FKs form <<FK>> table's part.
« Last Edit: October 23, 2007, 10:51:16 pm by MStaniszczak »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: FK operation sometimes dissappears after savin
« Reply #4 on: October 23, 2007, 11:25:52 pm »
In [size=13]BUG: Weird FK behaviour[/size] you'll see I document some bugs...

It would seem there is some sort of problem with composite (concatenated) keys.

You example, though unusual, is perfectly valid.

Report this as a bug to Sparx.  You can use the [size=13]Report a Bug[/size] link via the Support link at the top and bottom of the page.
Place a reference back to this topic in the bug report.  That way, the Sparxians can see any ongoing discussion.
If you get a response, please add it to the topic.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

MStaniszczak

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: FK operation sometimes dissappears after savin
« Reply #5 on: October 24, 2007, 12:03:25 am »
And one more interesting thing. On one of my machine I have still trial version of EA. On this machine everything work perfect. On other, witch full EA I have this problem.
OK. I report this bug to Sparx, but now I waiting for answer form Sparx support.

MStaniszczak

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: FK operation sometimes dissappears after savin
« Reply #6 on: October 24, 2007, 09:50:52 pm »
Here you are replay from Sparx support:

"Thanks for the model.

Attached is your model with the foreign key created using build 817 full
version.
I don't see anything missing from the newly created foreign key. "


:-( So no solution:-(
I send them another example.
« Last Edit: October 24, 2007, 10:10:14 pm by MStaniszczak »