Wrong table for subclass FK mapping

Hi!
I use “SuperClass” for ORM Table for subclass FK mapping. I have the follow class diagram (please, see attachments). But I got incorrect ERD (please, see badERD.jpg), because relation Class3 - Class4 is non-identifying.
What do you think about it?

Eugeny
badERD.JPG
classes.JPG

Hi Eugeny,

Thanks for your post. I created the class diagram as your screenshot but cannot repeat the incorrect relationship in ERD. Would you mind to attach a sample project and tell me the build you are using? You can find the build from About dialog. Thanks in advance!

Best regards,
Lilian Wong

Hi!
I sent my project on your e-mail (please see private message for more information).
I use Build 20091009.
TIA, Eugeny

Hi Eugeny,

Thanks for your project file. I opened your project (and confirmed you selected Table per subclass strategy for all subclasses), then synchronize the class diagram to ERD. It corrects the “incorrect” relationship ERD between the entity “StaticObject” and “CrossingPlace”.

May I know whether you tried synchronize the class diagram to ERD? Maybe you could tell me step-by-step procedure to repeat your problem? Thanks!

Best regards,
Lilian Wong

Yes, I try synchronize the class diagram to ERD.
Step-by-step:

  1. right-click mouse -> Synchronize to Entity Relationship Diagram
  2. Target Parent: Root
  3. Primery key selected “id”
  4. Click “OK”

When I deleted wrong relationship and than I selected “Synhronize to ERD” - Relationship became true!..

Hi Eugeny,

Thanks for replying. It’s a bit strange that even if I do not remove the problematic relationship and synchronize class diagram to entity relationship diagram (ERD) can correct the relationship…
Anyway, it’s good news that the problem is solved.

Best regards,
Lilian Wong

I think, that problem isn’t solved. I want generate correct ERD from ClassDiagram without manual updating.
In other words, there are three steps in generation ERD:

  1. generate ERD from ClassDiagram (some Relations are wrong)
  2. delete all relations from ERD
  3. synchronize ClassDiagram to ERD (all Relations become true)
    But it is difficult…

And in this case we have two attribute in Primary Key (for true relations on step 1) (for example: ClassId and ClassId2 for Class3)

HI Eugeny,

Sorry for my late response. As I cannot repeat this problem with the project you sent me before, would you mind to send me another project (to lilian.wong@visual-paradigm.com ) that can repeat problem of synchronization between diagrams not updating relationships correctly? Thanks in adv advance!

Best regards,
Lilian Wong

I sent my similar project on you e-mail.
TIA.
Eugeny

Hi Eugeny,

Thanks for the file. I’ve forwarded the issue to our engineers to follow-up, and I’ll let you know once this problem is fixed.

Best regards,
Lilian Wong

Thank you very much!

Hi Eugeny,

You are welcome. :slight_smile:
We fixed this problem already and please update to latest patch (build sp1_20091125f or later) for the bug fix. More details about update to latest patch can be found from:

Please be reminded that you need to remove existing entities in project (from Model Explorer) and re-synchronize the class diagram to ERD to generate correct relationship.

Best regards,
Lilian Wong

It’s work in the sp1_20091127 build. Thanks!

Hi Eugeny,

You are welcome.

Best regards,
Lilian Wong